From b6303313f0145c4caf58195ba4a85d2f4fa2967c 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 5f7ef436c..1dfd71107 100644 --- a/NEWS +++ b/NEWS @@ -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; }