diff options
author | wm4 <wm4@nowhere> | 2015-11-01 19:53:48 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-01 19:53:48 +0100 |
commit | f1e767b6a2539b9c4760cc63f2e8d96308153ebc (patch) | |
tree | bc3c3effb11f1d4592341e491d0a63210fcdbe71 | |
parent | 85818351610b6b3fa72ab46bbb17875876d99fe9 (diff) | |
download | mpv-f1e767b6a2539b9c4760cc63f2e8d96308153ebc.tar.bz2 mpv-f1e767b6a2539b9c4760cc63f2e8d96308153ebc.tar.xz |
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.
-rw-r--r-- | player/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |