From 3f9400d968c412ef1e961b4ee9900cc1dcfba05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 9 Feb 2009 16:09:22 +0100 Subject: mxfdemux: Only go into EOS and send segment-done after all tracks are finished --- gst/mxf/mxfdemux.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 5fff31df..732759eb 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -2675,8 +2675,22 @@ gst_mxf_demux_loop (GstPad * pad) if ((demux->segment.flags & GST_SEEK_FLAG_SEGMENT) && (demux->segment.stop != -1) && (demux->segment.last_stop >= demux->segment.stop)) { - ret = GST_FLOW_UNEXPECTED; - goto pause; + guint i; + gboolean eos = TRUE; + + for (i = 0; i < demux->src->len; i++) { + GstMXFDemuxPad *p = g_ptr_array_index (demux->src, i); + + if (!p->eos && p->last_stop < demux->segment.stop) { + eos = FALSE; + break; + } + } + + if (eos) { + ret = GST_FLOW_UNEXPECTED; + goto pause; + } } gst_object_unref (demux); -- cgit v1.2.1