Commit e5b3d925 authored by Seungha Yang's avatar Seungha Yang Committed by Sebastian Dröge

qtdemux: Don't modify upstream TIME segment

TIME segment implies that stream/running time is being handled by upstream.
So, we shouldn't override it without any clue.
This patch is for fixing seek in DASH streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=774196
parent 6a7bdfd2
......@@ -2161,12 +2161,15 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
goto exit;
}
/* accept upstream's notion of segment and distribute along */
segment.format = GST_FORMAT_TIME;
segment.position = segment.time = segment.start;
segment.duration = demux->segment.duration;
segment.base = gst_segment_to_running_time (&demux->segment,
GST_FORMAT_TIME, demux->segment.position);
/* We shouldn't modify upstream driven TIME FORMAT segment */
if (!demux->upstream_format_is_time) {
/* accept upstream's notion of segment and distribute along */
segment.format = GST_FORMAT_TIME;
segment.position = segment.time = segment.start;
segment.duration = demux->segment.duration;
segment.base = gst_segment_to_running_time (&demux->segment,
GST_FORMAT_TIME, demux->segment.position);
}
gst_segment_copy_into (&segment, &demux->segment);
GST_DEBUG_OBJECT (demux, "Pushing newseg %" GST_SEGMENT_FORMAT, &segment);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment