decoder/Control: use switch/case in Seek()
This commit is contained in:
parent
c6d1d360a3
commit
27bfcda20d
@ -109,8 +109,19 @@ DecoderControl::Seek(SongTime t)
|
|||||||
{
|
{
|
||||||
assert(state != DecoderState::START);
|
assert(state != DecoderState::START);
|
||||||
|
|
||||||
if (state == DecoderState::STOP ||
|
switch (state) {
|
||||||
state == DecoderState::ERROR || !seekable)
|
case DecoderState::START:
|
||||||
|
gcc_unreachable();
|
||||||
|
|
||||||
|
case DecoderState::ERROR:
|
||||||
|
case DecoderState::STOP:
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case DecoderState::DECODE:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!seekable)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seek_time = t;
|
seek_time = t;
|
||||||
|
Loading…
Reference in New Issue
Block a user