From a98aad61f854d9a216675dc54096aa39767c4a35 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 16 Jul 2013 23:14:55 +0200 Subject: core: move video refresh function to mplayer.c --- core/mplayer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/mplayer.c') diff --git a/core/mplayer.c b/core/mplayer.c index f7a0b701dc..363d89cc53 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -2379,6 +2379,16 @@ no_video: return 0; } +// Try to refresh the video by doing a precise seek to the currently displayed +// frame. This can go wrong in all sorts of ways, so use sparingly. +void mp_force_video_refresh(struct MPContext *mpctx) +{ + struct MPOpts *opts = &mpctx->opts; + + if (opts->pause && mpctx->last_vo_pts != MP_NOPTS_VALUE) + queue_seek(mpctx, MPSEEK_ABSOLUTE, mpctx->last_vo_pts, 1); +} + static void add_frame_pts(struct MPContext *mpctx, double pts) { if (pts == MP_NOPTS_VALUE || mpctx->hrseek_framedrop) { -- cgit v1.2.3