mirror of https://github.com/mpv-player/mpv
vo: don't invoke wait, when not needed
This causes only problems, because we convert mp_time to realtime, which is not atomic, so we introduce error. And even though on sane platforms it should work fine, after all the sleep time is in the past. winpthreads like to sleep for like over 10ms when the time is less than current time, but not more than 1s.
This commit is contained in:
parent
7035debddf
commit
0ba6ca6f76
|
@ -1150,6 +1150,9 @@ static void *vo_thread(void *ptr)
|
|||
if (vo->want_redraw) // might have been set by VOCTRLs
|
||||
wait_until = 0;
|
||||
|
||||
if (wait_until <= now)
|
||||
continue;
|
||||
|
||||
wait_vo(vo, wait_until);
|
||||
}
|
||||
forget_frames(vo); // implicitly synchronized
|
||||
|
|
Loading…
Reference in New Issue