mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-22 10:57:08 +00:00
player/video: only set a/v speed factor to 1 when exiting display-sync
Previously this would be called on every frame presented, this only needs to be called if display sync was active for the last frame but isn't active anymore. This hid the bug mentioned in #16947 if VO was active.
This commit is contained in:
@@ -955,9 +955,11 @@ static void schedule_frame(struct MPContext *mpctx, struct vo_frame *frame)
|
||||
}
|
||||
|
||||
if (!mpctx->display_sync_active) {
|
||||
mpctx->speed_factor_a = 1.0;
|
||||
mpctx->speed_factor_v = 1.0;
|
||||
update_playback_speed(mpctx);
|
||||
if (mpctx->num_past_frames > 1 && mpctx->past_frames[1].num_vsyncs >= 0) {
|
||||
mpctx->speed_factor_a = 1.0;
|
||||
mpctx->speed_factor_v = 1.0;
|
||||
update_playback_speed(mpctx);
|
||||
}
|
||||
|
||||
update_av_diff(mpctx, mpctx->time_frame > 0 ?
|
||||
mpctx->time_frame * mpctx->video_speed : 0);
|
||||
|
||||
Reference in New Issue
Block a user