Commit 76a90497 authored by Max Kellermann's avatar Max Kellermann

decoder/Control: State::ERROR is illegal

The state ERROR can only be entered during decoder initialization, and Seek() may only be called after initialization has been finished.
parent 27bfcda2
......@@ -108,12 +108,13 @@ bool
DecoderControl::Seek(SongTime t)
{
assert(state != DecoderState::START);
assert(state != DecoderState::ERROR);
switch (state) {
case DecoderState::START:
case DecoderState::ERROR:
gcc_unreachable();
case DecoderState::ERROR:
case DecoderState::STOP:
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment