summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-08 21:17:11 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-08 21:17:11 +0100
commit81fb90748fe9f141aabf8c569f478d451cd33e09 (patch)
tree437299d3900d73e0f8515b66bd39721b0255a75e /gst
parentc33678dab3f2b926675ef8b6eca3198c3c20ecdd (diff)
downloadgst-plugins-bad-81fb90748fe9f141aabf8c569f478d451cd33e09.tar.gz
gst-plugins-bad-81fb90748fe9f141aabf8c569f478d451cd33e09.tar.bz2
gst-plugins-bad-81fb90748fe9f141aabf8c569f478d451cd33e09.zip
mxfdemux: When changing to the component after the last component update the essence track position
Diffstat (limited to 'gst')
-rw-r--r--gst/mxf/mxfdemux.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index e89e47f5..2ff8170e 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -1349,6 +1349,7 @@ static GstFlowReturn
gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
guint i)
{
+ GstFlowReturn ret = GST_FLOW_OK;
MXFMetadataSequence *sequence;
guint k;
MXFMetadataSourcePackage *source_package = NULL;
@@ -1362,7 +1363,7 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
if (pad->current_component_index >= sequence->n_structural_components) {
GST_DEBUG_OBJECT (demux, "After last structural component");
pad->current_component_index = sequence->n_structural_components - 1;
- return GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_UNEXPECTED;
}
GST_DEBUG_OBJECT (demux, "Switching to component %u",
@@ -1462,7 +1463,11 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
}
}
- return GST_FLOW_OK;
+ if (ret == GST_FLOW_UNEXPECTED) {
+ pad->current_essence_track_position += pad->current_component_duration;
+ }
+
+ return ret;
}
static GstFlowReturn
@@ -2912,8 +2917,8 @@ gst_mxf_demux_pad_set_last_stop (GstMXFDemux * demux, GstMXFDemuxPad * p,
p->eos = TRUE;
p->last_stop = sum;
p->last_stop_accumulated_error = 0.0;
- p->current_essence_track_position =
- p->material_track->parent.sequence->duration;
+
+ gst_mxf_demux_pad_set_component (demux, p, i);
return;
}