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:
wm4 2015-11-01 19:53:48 +01:00
parent 8581835161
commit f1e767b6a2
1 changed files with 1 additions and 1 deletions

View File

@ -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;