aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoder/vorbis_encoder.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-03-16 19:13:46 +0100
committerMax Kellermann <max@duempel.org>2011-03-16 19:13:46 +0100
commita28449a123cd1e49503e267f37c3c900f9c70b29 (patch)
treec77d327b62b4352f8c7ac36572490c1da2276337 /src/encoder/vorbis_encoder.c
parent84d0fd39a3d675a69da0505fd4edd7ebb874e1fb (diff)
downloadmpd-a28449a123cd1e49503e267f37c3c900f9c70b29.tar.gz
mpd-a28449a123cd1e49503e267f37c3c900f9c70b29.tar.xz
mpd-a28449a123cd1e49503e267f37c3c900f9c70b29.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.
Diffstat (limited to '')
-rw-r--r--src/encoder/vorbis_encoder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c
index a5f6387f6..3fbbe5b61 100644
--- a/src/encoder/vorbis_encoder.c
+++ b/src/encoder/vorbis_encoder.c
@@ -274,6 +274,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;
}