From 87ae9d3e45ef6e331b34fa92ac1d0c68495f5379 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 5 Apr 2012 00:23:32 +0300 Subject: core: in VO flip timing, recheck time after OSD draw Make the code read current real time again after drawing OSD. This ensures time taken in OSD drawing is properly deducted from the duration of the following sleep. The main practical effect is to avoid the A-V field on the status line staying at a value a couple of milliseconds above 0 (depending on VO). --- mplayer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index cc56cc802b..edeffef9e4 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3559,6 +3559,7 @@ static void run_playloop(struct MPContext *mpctx) vf->control(vf, VFCTRL_DRAW_OSD, mpctx->osd); vo_osd_changed(0); + mpctx->time_frame -= get_relative_time(mpctx); mpctx->time_frame -= vo->flip_queue_offset; float aq_sleep_time = mpctx->time_frame; if (mpctx->time_frame > 0.001 -- cgit v1.2.3