mirror of
https://github.com/mpv-player/mpv
synced 2025-02-21 15:27:00 +00:00
player/video: account for repeats in ideal_frame_vsync_duration
Frame repeats may occur to compensate for A/V diff. This commit ensures a uniform distribution of vsync points based on the number of repeats.
This commit is contained in:
parent
6fce181a25
commit
01b4b20643
@ -924,6 +924,10 @@ static void handle_display_sync_frame(struct MPContext *mpctx,
|
||||
frame->num_vsyncs = num_vsyncs;
|
||||
frame->display_synced = true;
|
||||
|
||||
// Adjust frame virtual vsyncs by the repeat count
|
||||
if (drop_repeat > 0)
|
||||
frame->ideal_frame_vsync_duration /= drop_repeat;
|
||||
|
||||
mpctx->display_sync_active = true;
|
||||
// Try to avoid audio underruns that may occur if we update
|
||||
// the playback speed while in the STATUS_SYNCING state.
|
||||
|
Loading…
Reference in New Issue
Block a user