Commit d95db286 authored by Max Kellermann's avatar Max Kellermann

decoder/flac: check for errors only after _process_single()

The only other libFLAC call (seek) does not produce fatal errors.
parent 851fb16e
...@@ -286,16 +286,14 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec, ...@@ -286,16 +286,14 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
/* end of this sub track */ /* end of this sub track */
break; break;
if (!FLAC__stream_decoder_process_single(flac_dec)) { if (!FLAC__stream_decoder_process_single(flac_dec) &&
cmd = decoder_get_command(decoder); decoder_get_command(decoder) == DECODE_COMMAND_NONE) {
if (cmd != DECODE_COMMAND_SEEK) /* a failure that was not triggered by a
decoder command */
flacPrintErroredState(FLAC__stream_decoder_get_state(flac_dec));
break; break;
} }
} }
if (cmd != DECODE_COMMAND_STOP) {
flacPrintErroredState(FLAC__stream_decoder_get_state(flac_dec));
}
} }
static FLAC__StreamDecoderInitStatus static FLAC__StreamDecoderInitStatus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment