mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
video: reset display_sync_error when resetting state
This would cause mpv to, in some very specific scenarios, have a negative vsync_offset after seeking which would result in mpv requesting a pts before the first frame to libplacebo. Fix it by setting it to 0 when we reset state, such as after seeking. Fixes: https://github.com/mpv-player/mpv/issues/12813
This commit is contained in:
@@ -119,6 +119,7 @@ void reset_video_state(struct MPContext *mpctx)
|
||||
mpctx->mistimed_frames_total = 0;
|
||||
mpctx->drop_message_shown = 0;
|
||||
mpctx->display_sync_drift_dir = 0;
|
||||
mpctx->display_sync_error = 0;
|
||||
|
||||
mpctx->video_status = mpctx->vo_chain ? STATUS_SYNCING : STATUS_EOF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user