mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
player: raise display sync desync tolerance
Bump it to 80, and 2 vsyncs. This is another measure against vsync jitter. Admittedly this is a bit simplistic (and we should probably estimate a stable estimated vsync phase instead), but for now this will do.
This commit is contained in:
parent
ce82d88215
commit
33489feca8
@ -962,13 +962,10 @@ static void handle_display_sync_frame(struct MPContext *mpctx,
|
||||
|
||||
// If we are too far ahead/behind, attempt to drop/repeat frames. In
|
||||
// particular, don't attempt to change speed for them.
|
||||
if (drop)
|
||||
// Tolerate some desync to avoid frame dropping due to jitter.
|
||||
if (drop && fabs(av_diff) >= 0.080 && fabs(av_diff) / vsync >= 2)
|
||||
drop_repeat = -av_diff / vsync; // round towards 0
|
||||
|
||||
// Tolerate at least 1 video frame desync.
|
||||
if (abs(drop_repeat) <= 1)
|
||||
drop_repeat = 0;
|
||||
|
||||
av_diff += drop_repeat * vsync;
|
||||
|
||||
if (resample) {
|
||||
|
Loading…
Reference in New Issue
Block a user