mirror of https://github.com/mpv-player/mpv
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:
parent
a7186777de
commit
0257d53d2c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue