mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
matroskademux: Only take the stream_start_time into account for SET seeks
For other seeks the stream_start_time is already added to the segment values. Conflicts: gst/matroska/matroska-demux.c
This commit is contained in:
parent
cc6d533521
commit
42b5065cc4
1 changed files with 12 additions and 5 deletions
|
@ -1946,13 +1946,20 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
|
|||
GST_DEBUG_OBJECT (demux, "configuring seek");
|
||||
gst_segment_do_seek (&seeksegment, rate, format, flags,
|
||||
cur_type, cur, stop_type, stop, &update);
|
||||
/* compensate for clip start time */
|
||||
/* compensate for clip start time, but only for SET seeks,
|
||||
* otherwise it is already part of the segments */
|
||||
if (GST_CLOCK_TIME_IS_VALID (demux->stream_start_time)) {
|
||||
seeksegment.position += demux->stream_start_time;
|
||||
seeksegment.start += demux->stream_start_time;
|
||||
if (GST_CLOCK_TIME_IS_VALID (seeksegment.stop))
|
||||
if (cur_type == GST_SEEK_TYPE_SET) {
|
||||
if (rate > 0.0)
|
||||
seeksegment.position += demux->stream_start_time;
|
||||
seeksegment.start += demux->stream_start_time;
|
||||
}
|
||||
if (stop_type == GST_SEEK_TYPE_SET
|
||||
&& GST_CLOCK_TIME_IS_VALID (seeksegment.stop)) {
|
||||
if (rate < 0.0)
|
||||
seeksegment.position += demux->stream_start_time;
|
||||
seeksegment.stop += demux->stream_start_time;
|
||||
/* note that time should stay at indicated position */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue