From: Wim Taymans Date: Thu, 20 Jan 2011 11:14:08 +0000 (+0100) Subject: qtdemux: take configured start time into account X-Git-Tag: RELEASE-0.10.29~675 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=899dad89498bb00da02ea1163370e69b082bf57b;p=platform%2Fupstream%2Fgst-plugins-good.git qtdemux: take configured start time into account when creating the newsegment event, take the configured start time into account. --- diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index dbb8228..01701a2 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -3018,9 +3018,16 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, start = MIN (segment->media_start + seg_time, stop); time = offset; } else { - start = segment->media_start; + if (segment->media_start >= qtdemux->segment.start) { + start = segment->media_start; + time = segment->time; + } else { + start = qtdemux->segment.start; + time = segment->time + (qtdemux->segment.start - segment->media_start); + } + + start = MAX (segment->media_start, qtdemux->segment.start); stop = MIN (segment->media_start + seg_time, stop); - time = segment->time; } GST_DEBUG_OBJECT (qtdemux, "newsegment %d from %" GST_TIME_FORMAT