summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-06-10 22:30:28 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:05 +0200
commit73a48ff47b93b9d2d5a499236a50bc6f4c4d5604 (patch)
treebedbd0ce0a33d61cb886a7647044e3167309645e
parent0f6cda4ab13b4eb836ad3aa336c320b6b19d53ae (diff)
downloadmpv-73a48ff47b93b9d2d5a499236a50bc6f4c4d5604.tar.bz2
mpv-73a48ff47b93b9d2d5a499236a50bc6f4c4d5604.tar.xz
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.)
-rw-r--r--demux/demux.c2
1 files changed, 2 insertions, 0 deletions
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 ||