flac: explicitly check for STOP command

After the decoder command was obtained, don't wait until libflac
detects EOF (as a side effect), quit the decoder immediately.  This
check was missing completely.
This commit is contained in:
Max Kellermann 2009-03-05 18:20:43 +01:00
parent efd606337e
commit b0fcce65d8

View File

@ -363,7 +363,8 @@ flac_decode_internal(struct decoder * decoder,
decoder_command_finished(decoder);
} else
decoder_seek_error(decoder);
} else if (flac_get_state(flac_dec) == flac_decoder_eof)
} else if (cmd == DECODE_COMMAND_STOP ||
flac_get_state(flac_dec) == flac_decoder_eof)
break;
if (!flac_process_single(flac_dec)) {