From a28449a123cd1e49503e267f37c3c900f9c70b29 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 16 Mar 2011 19:13:46 +0100 Subject: [PATCH] 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. --- NEWS | 2 ++ src/encoder/vorbis_encoder.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index f89387fd4..565468ff1 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.15.17 (2011/??/??) +* encoder: + - vorbis: reset the Ogg stream after flush ver 0.15.16 (2011/03/13) 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; }