aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-02-11 12:56:52 +0100
committerMax Kellermann <max@duempel.org>2012-02-11 12:56:52 +0100
commit851fb16e7cc355e0b3b9c115b4fd12f866f28203 (patch)
tree9ac28922917a004361721306f34d03aa591a6d51
parenta4cbaafd10d0ab0e0b6dc78a2f4444f08f546627 (diff)
downloadmpd-851fb16e7cc355e0b3b9c115b4fd12f866f28203.tar.gz
mpd-851fb16e7cc355e0b3b9c115b4fd12f866f28203.tar.xz
mpd-851fb16e7cc355e0b3b9c115b4fd12f866f28203.zip
decoder/flac: symmetric FLAC__stream_decoder_finish() calls
Call it in the function that also invokved FLAC__stream_decoder_init_*().
Diffstat (limited to '')
-rw-r--r--src/decoder/flac_decoder_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/decoder/flac_decoder_plugin.c b/src/decoder/flac_decoder_plugin.c
index 418f00549..e8e93ff37 100644
--- a/src/decoder/flac_decoder_plugin.c
+++ b/src/decoder/flac_decoder_plugin.c
@@ -295,7 +295,6 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
if (cmd != DECODE_COMMAND_STOP) {
flacPrintErroredState(FLAC__stream_decoder_get_state(flac_dec));
- FLAC__stream_decoder_finish(flac_dec);
}
}
@@ -369,6 +368,7 @@ flac_decode_internal(struct decoder * decoder,
if (!flac_decoder_initialize(&data, flac_dec, 0)) {
flac_data_deinit(&data);
+ FLAC__stream_decoder_finish(flac_dec);
FLAC__stream_decoder_delete(flac_dec);
return;
}
@@ -376,6 +376,8 @@ flac_decode_internal(struct decoder * decoder,
flac_decoder_loop(&data, flac_dec, 0, 0);
flac_data_deinit(&data);
+
+ FLAC__stream_decoder_finish(flac_dec);
FLAC__stream_decoder_delete(flac_dec);
}