diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:06 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:06 +0200 |
commit | ee3bbb50287210768dabf3c14a11f397871c4822 (patch) | |
tree | dc4b8e152d3b6c6ed13b5db069d13528c687612a | |
parent | 0d8b551c5a3aeadfd6901469946078d5a95ecb42 (diff) | |
download | mpd-ee3bbb50287210768dabf3c14a11f397871c4822.tar.gz mpd-ee3bbb50287210768dabf3c14a11f397871c4822.tar.xz mpd-ee3bbb50287210768dabf3c14a11f397871c4822.zip |
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".
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 27d0fab2e..dfd6ef038 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -983,19 +983,15 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder, decodeNextFrameHeader(data, NULL, replayGainInfo)) == DECODE_CONT && dc.command != DECODE_COMMAND_STOP) ; - if (ret == DECODE_BREAK || - dc.command == DECODE_COMMAND_STOP || - dc.command == DECODE_COMMAND_SEEK) + if (ret == DECODE_BREAK || dc.command != DECODE_COMMAND_NONE) break; else if (ret == DECODE_SKIP) skip = 1; if (!data->muteFrame) { while ((ret = decodeNextFrame(data)) == DECODE_CONT && - dc.command != DECODE_COMMAND_STOP && - dc.command != DECODE_COMMAND_SEEK) ; + dc.command == DECODE_COMMAND_NONE) ; if (ret == DECODE_BREAK || - dc.command == DECODE_COMMAND_STOP || - dc.command == DECODE_COMMAND_SEEK) + dc.command != DECODE_COMMAND_NONE) break; } if (!skip && ret == DECODE_OK) |