aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/oggflac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
commite530181e233f315f90c31e0d4aae63449222f46c (patch)
tree43b10597e3472d2edfa05250fc11f746a6d27f4a /src/inputPlugins/oggflac_plugin.c
parent4515ac5ecbab8cdb0a92e3873a54238f901757c2 (diff)
downloadmpd-e530181e233f315f90c31e0d4aae63449222f46c.tar.gz
mpd-e530181e233f315f90c31e0d4aae63449222f46c.tar.xz
mpd-e530181e233f315f90c31e0d4aae63449222f46c.zip
check decoder_command!=NONE instead of decoder_command==STOP
The code said "decoder_command==STOP" because that was a conversion from the old "dc->stop" test. As we can now check for all commands in one test, we can simply rewrite that to decoder_command!=NONE.
Diffstat (limited to 'src/inputPlugins/oggflac_plugin.c')
-rw-r--r--src/inputPlugins/oggflac_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c
index f56a6b5ec..2adbaed60 100644
--- a/src/inputPlugins/oggflac_plugin.c
+++ b/src/inputPlugins/oggflac_plugin.c
@@ -51,7 +51,7 @@ static OggFLAC__SeekableStreamDecoderReadStatus of_read_cb(const
*bytes = r;
if (r == 0 && !inputStreamAtEOF(data->inStream) &&
- decoder_get_command(data->decoder) != DECODE_COMMAND_STOP)
+ decoder_get_command(data->decoder) == DECODE_COMMAND_NONE)
return OggFLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
return OggFLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
@@ -365,14 +365,14 @@ static int oggflac_decode(struct decoder * mpd_decoder, InputStream * inStream)
}
}
- if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) {
+ if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_NONE) {
oggflacPrintErroredState
(OggFLAC__seekable_stream_decoder_get_state(decoder));
OggFLAC__seekable_stream_decoder_finish(decoder);
}
/* send last little bit */
if (data.chunk_length > 0 &&
- decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) {
+ decoder_get_command(mpd_decoder) == DECODE_COMMAND_NONE) {
flacSendChunk(&data);
decoder_flush(mpd_decoder);
}