From e530181e233f315f90c31e0d4aae63449222f46c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:15 +0200 Subject: 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. --- src/inputPlugins/oggflac_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inputPlugins/oggflac_plugin.c') 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); } -- cgit v1.2.3