summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-09 16:09:22 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-09 16:40:44 +0100
commit3f9400d968c412ef1e961b4ee9900cc1dcfba05e (patch)
treefed14b5c37b37b43a185636b1dbb29e61977e299
parent15c0db9c38407cd8b8f7fa70ecb0dedf3cc42848 (diff)
downloadgst-plugins-bad-3f9400d968c412ef1e961b4ee9900cc1dcfba05e.tar.gz
gst-plugins-bad-3f9400d968c412ef1e961b4ee9900cc1dcfba05e.tar.bz2
gst-plugins-bad-3f9400d968c412ef1e961b4ee9900cc1dcfba05e.zip
mxfdemux: Only go into EOS and send segment-done after all tracks are finished
-rw-r--r--gst/mxf/mxfdemux.c18
1 files 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);