summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Marten <gunnar.marten@artcom.de>2019-02-28 21:48:51 +0100
committerJan Ekström <jeebjp@gmail.com>2019-03-01 00:55:06 +0200
commitb275232141f569d14d34b263ac059a77225222cc (patch)
tree7a06e94b65317472467f2dd865bdcd0e3d22386e
parentd38c4879d7917933c2711dff9b6b30979133c6c8 (diff)
downloadmpv-b275232141f569d14d34b263ac059a77225222cc.tar.bz2
mpv-b275232141f569d14d34b263ac059a77225222cc.tar.xz
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
-rw-r--r--demux/demux.c4
1 files 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);
}