mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
mxfdemux: When changing to the component after the last component update the essence track position
This commit is contained in:
parent
c33678dab3
commit
81fb90748f
1 changed files with 9 additions and 4 deletions
|
@ -1349,6 +1349,7 @@ static GstFlowReturn
|
||||||
gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
|
gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
|
||||||
guint i)
|
guint i)
|
||||||
{
|
{
|
||||||
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
MXFMetadataSequence *sequence;
|
MXFMetadataSequence *sequence;
|
||||||
guint k;
|
guint k;
|
||||||
MXFMetadataSourcePackage *source_package = NULL;
|
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) {
|
if (pad->current_component_index >= sequence->n_structural_components) {
|
||||||
GST_DEBUG_OBJECT (demux, "After last structural component");
|
GST_DEBUG_OBJECT (demux, "After last structural component");
|
||||||
pad->current_component_index = sequence->n_structural_components - 1;
|
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",
|
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
|
static GstFlowReturn
|
||||||
|
@ -2912,8 +2917,8 @@ gst_mxf_demux_pad_set_last_stop (GstMXFDemux * demux, GstMXFDemuxPad * p,
|
||||||
p->eos = TRUE;
|
p->eos = TRUE;
|
||||||
p->last_stop = sum;
|
p->last_stop = sum;
|
||||||
p->last_stop_accumulated_error = 0.0;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue