From 42b60627fa14fb0b8a81b217f04be7ae2927a98c Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 30 Dec 2019 19:50:29 +0100 Subject: [PATCH] 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. --- gst/mpegtsdemux/tsdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index c50f811798..822100b073 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -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