From fedaad8250b9c9e262da3cda2114ccf5b62703a3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Aug 2015 18:40:16 +0200 Subject: player: separate controls for user and video controlled speed For video sync, we want separate playback speed controls for user- requested speed and the "correction" speed for video timing. Further, we use this separation to make sure only a resampler is inserted if playback speed is only changed for video sync correction. As of this commit, this is basically inactive code. It's just preparation for the video sync code (the following commit). --- player/loadfile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 6d94c13bd3..23ffafc1b9 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1018,6 +1018,8 @@ static void play_current_file(struct MPContext *mpctx) mpctx->playing_msg_shown = false; mpctx->backstep_active = false; mpctx->max_frames = -1; + mpctx->video_speed = mpctx->audio_speed = opts->playback_speed; + mpctx->speed_factor_a = mpctx->speed_factor_v = 1.0; mpctx->broken_fps_header = false; mpctx->seek = (struct seek_params){ 0 }; -- cgit v1.2.3