diff options
author | llyyr <llyyr.public@gmail.com> | 2023-11-06 00:07:16 +0530 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-11-06 11:39:45 +0100 |
commit | 0257d53d2c8f058d25af0b04a4c2e3b9676e8618 (patch) | |
tree | b4ddb117b58fa09365da25acb3001499505046bc /player/video.c | |
parent | a7186777de9ac6f4970f167204aa966752cee0db (diff) | |
download | mpv-0257d53d2c8f058d25af0b04a4c2e3b9676e8618.tar.bz2 mpv-0257d53d2c8f058d25af0b04a4c2e3b9676e8618.tar.xz |
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
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c index e05a0217c1..9ec2f5333e 100644 --- a/player/video.c +++ b/player/video.c @@ -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; } |