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.
This commit is contained in:
Max Kellermann 2015-11-11 17:28:48 +01:00
parent 27bfcda20d
commit 76a9049739

View File

@ -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;