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().
This commit is contained in:
Max Kellermann
2008-10-29 17:29:06 +01:00
parent 74c85811af
commit 528b7c3f5e
12 changed files with 3 additions and 30 deletions

View File

@@ -419,8 +419,6 @@ static int aac_stream_decode(struct decoder * mpd_decoder,
break;
}
decoder_flush(mpd_decoder);
faacDecClose(decoder);
if (b.buffer)
free(b.buffer);
@@ -556,8 +554,6 @@ static int aac_decode(struct decoder * mpd_decoder, char *path)
break;
}
decoder_flush(mpd_decoder);
faacDecClose(decoder);
if (b.buffer)
free(b.buffer);