mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 17:39:38 +00:00
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).
This commit is contained in:
parent
f045c1552e
commit
87ae9d3e45
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user