From 73a48ff47b93b9d2d5a499236a50bc6f4c4d5604 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Jun 2019 22:30:28 +0200 Subject: demux: fix minor seek_preroll consistency issue When packet appending sets the start of the range, it adjusts the range by seek_preroll. Do this when packets are pruned from the start of the range too. (Yeah, seek_preroll handling is probably broken in some other cases. It was halfhearted to begin with.) --- demux/demux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demux/demux.c b/demux/demux.c index 835c7bd63a..2ef95127dc 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -2185,6 +2185,8 @@ static void prune_old_packets(struct demux_internal *in) queue->seek_start = kf_min; if (queue->seek_start != MP_NOPTS_VALUE) { + queue->seek_start += ds->sh->seek_preroll; + // Don't need to update if the new start is still before the // range's start (or if the range was undefined anyway). if (range->seek_start == MP_NOPTS_VALUE || -- cgit v1.2.3