summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-14 14:02:13 +0200
committerwm4 <wm4@nowhere>2017-08-14 14:02:13 +0200
commit68201f4591bd07c7d7027d50fdb6cc5500c7382c (patch)
treefeb6fe9402487d6ce8a11656eda548e21c29b7b9 /player/video.c
parentb6d79deebbbb9aa95b176ad099abd5695d0a2366 (diff)
downloadmpv-68201f4591bd07c7d7027d50fdb6cc5500c7382c.tar.bz2
mpv-68201f4591bd07c7d7027d50fdb6cc5500c7382c.tar.xz
player: make refresh seeks slightly more robust
Refresh seeks are automatically issued when changing filters, which improves user experience if these filters change buffering or such. The refresh seek could actually overwrite a previously ongoing seek: set pause yes set time-pos 10 set vf "" Here, the video code issued a refresh seek to the previous video position, which could be different from the previously triggered (and still ongoing) seek, this overwriting the seek. Factor all refresh seek handling into a new function, and make it handle ongoing seeks correctly. Remove the weird new canonical_pts field, which actually had no use. Fixes #4757.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/player/video.c b/player/video.c
index 96e08ae815..0dca3a597f 100644
--- a/player/video.c
+++ b/player/video.c
@@ -551,13 +551,10 @@ void mp_force_video_refresh(struct MPContext *mpctx)
return;
// If not paused, the next frame should come soon enough.
- if ((opts->pause || mpctx->time_frame >= 0.5) &&
- (mpctx->video_status >= STATUS_PLAYING ||
- mpctx->video_status <= STATUS_DRAINING) &&
- mpctx->last_vo_pts != MP_NOPTS_VALUE)
+ if (opts->pause || mpctx->time_frame >= 0.5 ||
+ mpctx->video_status == STATUS_EOF)
{
- queue_seek(mpctx, MPSEEK_ABSOLUTE, mpctx->last_vo_pts,
- MPSEEK_VERY_EXACT, 0);
+ issue_refresh_seek(mpctx, MPSEEK_VERY_EXACT);
}
}