mirror of
https://github.com/mpv-player/mpv
synced 2025-03-04 05:07:51 +00:00
player: another fix to A/V difference calculation in display-sync mode
update_av_diff() works on the timestamps, while time_left is in real time. When playing at not-1 speed, these are very different, and cause the A/V difference to jitter. Fix this by scaling the expected A/V desync to the correct range.
This commit is contained in:
parent
8581835161
commit
f1e767b6a2
@ -1040,7 +1040,7 @@ static void handle_display_sync_frame(struct MPContext *mpctx,
|
||||
mpctx->mistimed_frames_total += 1;
|
||||
|
||||
mpctx->total_avsync_change = 0;
|
||||
update_av_diff(mpctx, time_left);
|
||||
update_av_diff(mpctx, time_left * opts->playback_speed);
|
||||
|
||||
// A bad guess, only needed when reverting to audio sync.
|
||||
mpctx->time_frame = time_left;
|
||||
|
Loading…
Reference in New Issue
Block a user