diff options
author | Max Kellermann <max@duempel.org> | 2011-03-16 19:13:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-03-16 19:16:06 +0100 |
commit | b6303313f0145c4caf58195ba4a85d2f4fa2967c (patch) | |
tree | 352ba4ea4bd48c95b71692a53923c7acc4968c1b | |
parent | 6dcec366214da4238819914985e4921e258ba324 (diff) | |
download | mpd-b6303313f0145c4caf58195ba4a85d2f4fa2967c.tar.gz mpd-b6303313f0145c4caf58195ba4a85d2f4fa2967c.tar.xz mpd-b6303313f0145c4caf58195ba4a85d2f4fa2967c.zip |
encoder/vorbis: reset the Ogg stream after flush
Without the ogg_stream_reset() call, the "e_o_s" flag never gets
reset, and libogg writes EOS packets over and over.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/encoder/vorbis_encoder.c | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -4,6 +4,8 @@ ver 0.16.2 (2011/??/??) * decoder: - tremor: fix configure test - gme: detect end of song +* encoder: + - vorbis: reset the Ogg stream after flush * output: - httpd: fix uninitialized variable - httpd: include sys/socket.h diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c index 9dac3564d..08147be1c 100644 --- a/src/encoder/vorbis_encoder.c +++ b/src/encoder/vorbis_encoder.c @@ -276,6 +276,8 @@ vorbis_encoder_flush(struct encoder *_encoder, G_GNUC_UNUSED GError **error) vorbis_analysis_init(&encoder->vd, &encoder->vi); vorbis_block_init(&encoder->vd, &encoder->vb); + ogg_stream_reset(&encoder->os); + encoder->flush = true; return true; } |