From 98a468a1013401298205390db43b63a6ff3a3478 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Apr 2012 23:10:38 +0200 Subject: encoder/vorbis: generate end-of-stream packet before tag Don't reset the ogg_stream_state object, because this discards the end-of-stream packet that was just added. --- src/encoder/vorbis_encoder.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/encoder') diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c index 38a998bd2..519d7cbf6 100644 --- a/src/encoder/vorbis_encoder.c +++ b/src/encoder/vorbis_encoder.c @@ -285,8 +285,6 @@ vorbis_encoder_pre_tag(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; } -- cgit v1.2.3 From 5acee73fc85e44179120a5818247fc0760038cff Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Apr 2012 00:03:38 +0200 Subject: encoder/vorbis: generate end-of-stream packet when playback ends Add the encoder_plugin method end(). This is important for the recorder plugin. --- src/encoder/flac_encoder.c | 1 + src/encoder/twolame_encoder.c | 1 + src/encoder/vorbis_encoder.c | 1 + 3 files changed, 3 insertions(+) (limited to 'src/encoder') diff --git a/src/encoder/flac_encoder.c b/src/encoder/flac_encoder.c index 6389513ef..e2c455e3a 100644 --- a/src/encoder/flac_encoder.c +++ b/src/encoder/flac_encoder.c @@ -354,6 +354,7 @@ const struct encoder_plugin flac_encoder_plugin = { .finish = flac_encoder_finish, .open = flac_encoder_open, .close = flac_encoder_close, + .end = flac_encoder_flush, .flush = flac_encoder_flush, .write = flac_encoder_write, .read = flac_encoder_read, diff --git a/src/encoder/twolame_encoder.c b/src/encoder/twolame_encoder.c index d20af551b..073c3128f 100644 --- a/src/encoder/twolame_encoder.c +++ b/src/encoder/twolame_encoder.c @@ -300,6 +300,7 @@ const struct encoder_plugin twolame_encoder_plugin = { .finish = twolame_encoder_finish, .open = twolame_encoder_open, .close = twolame_encoder_close, + .end = twolame_encoder_flush, .flush = twolame_encoder_flush, .write = twolame_encoder_write, .read = twolame_encoder_read, diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c index 519d7cbf6..9f09b2ac7 100644 --- a/src/encoder/vorbis_encoder.c +++ b/src/encoder/vorbis_encoder.c @@ -405,6 +405,7 @@ const struct encoder_plugin vorbis_encoder_plugin = { .finish = vorbis_encoder_finish, .open = vorbis_encoder_open, .close = vorbis_encoder_close, + .end = vorbis_encoder_pre_tag, .flush = vorbis_encoder_flush, .pre_tag = vorbis_encoder_pre_tag, .tag = vorbis_encoder_tag, -- cgit v1.2.3