summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-04-05 00:23:32 +0300
committerUoti Urpala <uau@mplayer2.org>2012-04-05 17:08:42 +0300
commit87ae9d3e45ef6e331b34fa92ac1d0c68495f5379 (patch)
treed664d92d436e52d806abd33c11e648a7da46b046 /mplayer.c
parentf045c1552e94cb2bf8380b19a73ae50e9aff0593 (diff)
downloadmpv-87ae9d3e45ef6e331b34fa92ac1d0c68495f5379.tar.bz2
mpv-87ae9d3e45ef6e331b34fa92ac1d0c68495f5379.tar.xz
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).
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c1
1 files changed, 1 insertions, 0 deletions
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