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

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.
parent 6a7bdfd2
...@@ -2161,12 +2161,15 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent, ...@@ -2161,12 +2161,15 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
goto exit; goto exit;
} }
/* accept upstream's notion of segment and distribute along */ /* We shouldn't modify upstream driven TIME FORMAT segment */
segment.format = GST_FORMAT_TIME; if (!demux->upstream_format_is_time) {
segment.position = segment.time = segment.start; /* accept upstream's notion of segment and distribute along */
segment.duration = demux->segment.duration; segment.format = GST_FORMAT_TIME;
segment.base = gst_segment_to_running_time (&demux->segment, segment.position = segment.time = segment.start;
GST_FORMAT_TIME, demux->segment.position); 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_segment_copy_into (&segment, &demux->segment);
GST_DEBUG_OBJECT (demux, "Pushing newseg %" GST_SEGMENT_FORMAT, &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