From a5323107d446e83cf096a69e11f8276a97bbfcb9 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 9 Jul 2011 18:33:38 -0700 Subject: [PATCH] oggmux: check for EOS on both current and best pad Oops, need both. Fixes #654270. --- ext/ogg/gstoggmux.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 2f2a11174b..083e21cd12 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -1374,6 +1374,19 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best) } } + /* We could end up pushing from the best pad instead, so check that + * as well */ + if (best && best != ogg_mux->pulling) { + next_buf = gst_collect_pads_peek (ogg_mux->collect, &best->collect); + if (next_buf) { + best->eos = FALSE; + gst_buffer_unref (next_buf); + } else { + GST_DEBUG_OBJECT (best->collect.pad, "setting eos to true"); + best->eos = TRUE; + } + } + /* if we were already pulling from one pad, but the new "best" buffer is * from another pad, we need to check if we have reason to flush a page * for the pad we were pulling from before */