diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2015-03-17 20:04:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-09 20:34:56 +0200 |
commit | c97f014576143c706e9d5189a89fa9959a651c71 (patch) | |
tree | 53991dd7c61a85aab84988c7be33339561e54eda /video/out | |
parent | f1746741dee6000b7fd139e7a10f72aba0674b3b (diff) | |
download | mpv-c97f014576143c706e9d5189a89fa9959a651c71.tar.bz2 mpv-c97f014576143c706e9d5189a89fa9959a651c71.tar.xz |
opengl: smoothmotion: wake up for next vsync a bit earlier
on my windows system this allows smoothmotion to work perfectly also in windowed
mode. There's no real right or wrong here, with the the only goal being to
always hit the next vsync. however, on cases where vsync timing is jittery (as
could happen with DWM), this patch tries to aim to the middle of the vsync cycle
to get as least affected as possible by such jitter.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 13727fad01..59b25591a9 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -623,7 +623,7 @@ static bool render_frame(struct vo *vo) if (in->vsync_timed) { // this is a heuristic that wakes the thread up some // time before the next vsync - target = next_vsync - MPMIN(in->vsync_interval / 3, 4e3); + target = next_vsync - MPMIN(in->vsync_interval / 2, 8e3); // We are very late with the frame and using vsync timing: probably // no new frames are coming in. This must be done whether or not |