aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-29 17:29:06 +0100
committerMax Kellermann <max@duempel.org>2008-10-29 17:29:06 +0100
commit528b7c3f5e7afc155058eeba631aa93ba9f42b0c (patch)
treee7874d0c9df831872431862f60150b9566e6a696 /src/decoder_thread.c
parent74c85811afe85d7cd3024156b204a5d68f94df86 (diff)
downloadmpd-528b7c3f5e7afc155058eeba631aa93ba9f42b0c.tar.gz
mpd-528b7c3f5e7afc155058eeba631aa93ba9f42b0c.tar.xz
mpd-528b7c3f5e7afc155058eeba631aa93ba9f42b0c.zip
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().
Diffstat (limited to '')
-rw-r--r--src/decoder_thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 68dbd4bb1..3bbe1f347 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;