From f1e767b6a2539b9c4760cc63f2e8d96308153ebc Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 1 Nov 2015 19:53:48 +0100 Subject: 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. --- player/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 6c0135ea34..349353e230 100644 --- a/player/video.c +++ b/player/video.c @@ -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; -- cgit v1.2.3