From 528b7c3f5e7afc155058eeba631aa93ba9f42b0c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 Oct 2008 17:29:06 +0100 Subject: decoder: automatically flush the output buffer after decoder exits A decoder_flush() invocation was missing in the FLAC plugin, resulting in casual assertion failures due to a wrong assumption about the last chunk's audio format. It's much easier to remove that decoder_flush() function and make the decoder thread call ob_flush(). --- src/decoder_thread.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/decoder_thread.c') diff --git a/src/decoder_thread.c b/src/decoder_thread.c index 68dbd4bb..3bbe1f34 100644 --- a/src/decoder_thread.c +++ b/src/decoder_thread.c @@ -21,6 +21,7 @@ #include "decoder_control.h" #include "decoder_internal.h" #include "player_control.h" +#include "outputBuffer.h" #include "song.h" #include "mapper.h" #include "path.h" @@ -147,6 +148,8 @@ static void decodeStart(void) } } + ob_flush(); + if (ret < 0 || ret == DECODE_ERROR_UNKTYPE) { if (ret != DECODE_ERROR_UNKTYPE) dc.error = DECODE_ERROR_FILE; -- cgit v1.2.3