From bf95f93c0189aa04f18e264b86b6527e431c5d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 6 Apr 2015 20:17:52 -0700 Subject: [PATCH] qtdemux: Don't accumulate segment bases manually gst_segment_do_seek() does that for us already, and doing it twice will break non-flushing seeks in interesting ways. Leftover from 1.0 porting. Also copy over segment offset and applied_rate, just in case. --- gst/isomp4/qtdemux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 4bcf91ea7c..2279097b68 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -3725,9 +3725,9 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, /* update the segment values used for clipping */ /* accumulate previous segments */ - if (GST_CLOCK_TIME_IS_VALID (stream->segment.stop)) - stream->segment.base += (stream->segment.stop - stream->segment.start) / - ABS (stream->segment.rate); + stream->segment.offset = qtdemux->segment.offset; + stream->segment.base = qtdemux->segment.base; + stream->segment.applied_rate = qtdemux->segment.applied_rate; stream->segment.rate = rate; stream->segment.start = start; stream->segment.stop = stop;