mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
qtdemux: Accumulate segments for edit lists before activating the next segment
eceb2ccc73
broke segment seeks by always
accumulating segments manually when activating a segment. This is only
needed when handling edit lists, not when activating a segment because of a
seek. Do the accumulation when switching edit list segments instead.
This fixes segment seeks again, while keeping edit lists playback working.
https://bugzilla.gnome.org/show_bug.cgi?id=755471
This commit is contained in:
parent
3c2044168d
commit
d7a0fd82c0
1 changed files with 7 additions and 5 deletions
|
@ -4192,11 +4192,6 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
|
|||
/* Copy flags from main segment */
|
||||
stream->segment.flags = qtdemux->segment.flags;
|
||||
|
||||
/* accumulate previous segments */
|
||||
if (GST_CLOCK_TIME_IS_VALID (stream->segment.stop))
|
||||
stream->accumulated_base += (stream->segment.stop - stream->segment.start) /
|
||||
ABS (stream->segment.rate);
|
||||
|
||||
/* update the segment values used for clipping */
|
||||
stream->segment.offset = qtdemux->segment.offset;
|
||||
stream->segment.base = qtdemux->segment.base + stream->accumulated_base;
|
||||
|
@ -4480,6 +4475,13 @@ next_segment:
|
|||
stream->time_position = segment->stop_time;
|
||||
}
|
||||
/* make sure we select a new segment */
|
||||
|
||||
/* accumulate previous segments */
|
||||
if (GST_CLOCK_TIME_IS_VALID (stream->segment.stop))
|
||||
stream->accumulated_base +=
|
||||
(stream->segment.stop -
|
||||
stream->segment.start) / ABS (stream->segment.rate);
|
||||
|
||||
stream->segment_index = -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue