mpegtsdemux: resurrect actual and efficient seeking of all kinds

... by seeking to target offset determined by new seek segment,
rather than that of the previous segment.  The latter would typically
seek back to start for a non-accurate seek, and lead to a lot
of skipping in case of an accurate seek.
This commit is contained in:
Mark Nauwelaerts 2019-12-30 19:50:29 +01:00
parent a139c8c7e8
commit 42b60627fa

View file

@ -897,7 +897,7 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event)
/* If the position actually changed, update == TRUE */
if (update) {
GstClockTime target = base->out_segment.start;
GstClockTime target = seeksegment.start;
if (target >= SEEK_TIMESTAMP_OFFSET)
target -= SEEK_TIMESTAMP_OFFSET;
else