summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2011-07-09 18:24:26 -0700
committerDavid Schleef <ds@schleef.org>2011-07-09 18:24:26 -0700
commit2fa9bf2be518d694d82810343a164f1843e4c634 (patch)
treedc01773b4e3a22ad3e3be2e7a1033b8ba6e5d105 /ext
parentb27d2469bd11bac0fc8c5d97408177b7471168a9 (diff)
oggmux: check for EOS on current pad, not best
Fixes #654270.
Diffstat (limited to 'ext')
-rw-r--r--ext/ogg/gstoggmux.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c
index b6004e351..2f2a11174 100644
--- a/ext/ogg/gstoggmux.c
+++ b/ext/ogg/gstoggmux.c
@@ -1360,14 +1360,18 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
GST_LOG_OBJECT (ogg_mux, "best pad %" GST_PTR_FORMAT
", currently pulling from %" GST_PTR_FORMAT, best->collect.pad,
- 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 {
- best->eos = TRUE;
+ ogg_mux->pulling ? ogg_mux->pulling->collect.pad : NULL);
+
+ if (ogg_mux->pulling) {
+ next_buf = gst_collect_pads_peek (ogg_mux->collect,
+ &ogg_mux->pulling->collect);
+ if (next_buf) {
+ ogg_mux->pulling->eos = FALSE;
+ gst_buffer_unref (next_buf);
+ } else {
+ GST_DEBUG_OBJECT (ogg_mux->pulling->collect.pad, "setting eos to true");
+ ogg_mux->pulling->eos = TRUE;
+ }
}
/* if we were already pulling from one pad, but the new "best" buffer is
@@ -1472,7 +1476,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
GST_GP_CAST (packet.granulepos), (gint64) packet.packetno,
packet.bytes);
- packet.e_o_s = best->eos ? 1 : 0;
+ packet.e_o_s = ogg_mux->pulling->eos ? 1 : 0;
tmpbuf = NULL;
/* we flush when we see a new keyframe */
@@ -1659,7 +1663,8 @@ all_pads_eos (GstCollectPads * pads)
while (walk) {
GstOggPadData *oggpad = (GstOggPadData *) walk->data;
- GST_DEBUG ("oggpad %p eos %d", oggpad, oggpad->eos);
+ GST_DEBUG_OBJECT (oggpad->collect.pad,
+ "oggpad %p eos %d", oggpad, oggpad->eos);
if (oggpad->eos == FALSE)
return FALSE;