1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-30 03:32:50 +00:00

player: disable total-avsync-change update in display-sync mode

The total-avsync-change property made no sense in display-sync mode (in
addition to making not all that much sense in general).
This commit is contained in:
wm4 2015-10-27 20:56:58 +01:00
parent c24921d56b
commit 70aa3b04f8

View File

@ -550,6 +550,9 @@ static void adjust_sync(struct MPContext *mpctx, double v_pts, double frame_time
change = max_change;
mpctx->delay += change;
mpctx->total_avsync_change += change;
if (mpctx->display_sync_active)
mpctx->total_avsync_change = 0;
}
// Make the frame at position 0 "known" to the playback logic. This must happen
@ -1038,6 +1041,7 @@ static void handle_display_sync_frame(struct MPContext *mpctx,
// for the sake of the video sync calculations we pretend it's perfect.
mpctx->time_frame -= mpctx->display_sync_error;
mpctx->time_frame /= opts->playback_speed * video_speed_correction;
mpctx->total_avsync_change = 0;
mpctx->speed_factor_v = video_speed_correction;