diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-01-20 12:14:08 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-01-24 16:48:17 +0100 |
commit | 899dad89498bb00da02ea1163370e69b082bf57b (patch) | |
tree | c58413b2e5f416cbc3d112224b9c39f2704b05d7 | |
parent | 06364a54ceea96cef0e814539a88da656c10bd93 (diff) |
qtdemux: take configured start time into accountrelease
when creating the newsegment event, take the configured start time
into account.
-rw-r--r-- | gst/qtdemux/qtdemux.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index dbb822863..01701a2e4 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 |