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:
parent
27bfcda20d
commit
76a9049739
|
@ -108,12 +108,13 @@ bool
|
||||||
DecoderControl::Seek(SongTime t)
|
DecoderControl::Seek(SongTime t)
|
||||||
{
|
{
|
||||||
assert(state != DecoderState::START);
|
assert(state != DecoderState::START);
|
||||||
|
assert(state != DecoderState::ERROR);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case DecoderState::START:
|
case DecoderState::START:
|
||||||
|
case DecoderState::ERROR:
|
||||||
gcc_unreachable();
|
gcc_unreachable();
|
||||||
|
|
||||||
case DecoderState::ERROR:
|
|
||||||
case DecoderState::STOP:
|
case DecoderState::STOP:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue