From b275232141f569d14d34b263ac059a77225222cc Mon Sep 17 00:00:00 2001 From: Gunnar Marten Date: Thu, 28 Feb 2019 21:48:51 +0100 Subject: demux: fix seek range update after head packets are pruned The seek range update was to early and did not take the removed head packets into account. And therefore missed that the queue was not BOF anymore. This led to not be able to backward seek before the first packet of the first seek range. Fix it by moving the seek range update after the possible removal and the change of the BOF flag. Fixes: #6522 --- demux/demux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demux/demux.c b/demux/demux.c index a8b392d74e..81d8fa5c2c 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1569,8 +1569,6 @@ static void prune_old_packets(struct demux_internal *in) } prev = prev->next; } - - update_seek_ranges(range); } bool done = false; @@ -1579,6 +1577,8 @@ static void prune_old_packets(struct demux_internal *in) remove_head_packet(queue); } + update_seek_ranges(range); + if (range != in->current_range && range->seek_start == MP_NOPTS_VALUE) free_empty_cached_ranges(in); } -- cgit v1.2.3