simplify several dc->command checks
Since we have merged dc->stop, dc->seek into one variable, we don't have to check both conditions at a time; we can replace "!stop && !seek" with "none".
This commit is contained in:
parent
0d8b551c5a
commit
ee3bbb5028
@ -983,19 +983,15 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder,
|
|||||||
decodeNextFrameHeader(data, NULL,
|
decodeNextFrameHeader(data, NULL,
|
||||||
replayGainInfo)) == DECODE_CONT
|
replayGainInfo)) == DECODE_CONT
|
||||||
&& dc.command != DECODE_COMMAND_STOP) ;
|
&& dc.command != DECODE_COMMAND_STOP) ;
|
||||||
if (ret == DECODE_BREAK ||
|
if (ret == DECODE_BREAK || dc.command != DECODE_COMMAND_NONE)
|
||||||
dc.command == DECODE_COMMAND_STOP ||
|
|
||||||
dc.command == DECODE_COMMAND_SEEK)
|
|
||||||
break;
|
break;
|
||||||
else if (ret == DECODE_SKIP)
|
else if (ret == DECODE_SKIP)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
if (!data->muteFrame) {
|
if (!data->muteFrame) {
|
||||||
while ((ret = decodeNextFrame(data)) == DECODE_CONT &&
|
while ((ret = decodeNextFrame(data)) == DECODE_CONT &&
|
||||||
dc.command != DECODE_COMMAND_STOP &&
|
dc.command == DECODE_COMMAND_NONE) ;
|
||||||
dc.command != DECODE_COMMAND_SEEK) ;
|
|
||||||
if (ret == DECODE_BREAK ||
|
if (ret == DECODE_BREAK ||
|
||||||
dc.command == DECODE_COMMAND_STOP ||
|
dc.command != DECODE_COMMAND_NONE)
|
||||||
dc.command == DECODE_COMMAND_SEEK)
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!skip && ret == DECODE_OK)
|
if (!skip && ret == DECODE_OK)
|
||||||
|
Loading…
Reference in New Issue
Block a user