summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-10 18:40:16 +0200
committerwm4 <wm4@nowhere>2015-08-10 18:40:16 +0200
commitfedaad8250b9c9e262da3cda2114ccf5b62703a3 (patch)
treeffd35bcfbb0b50f828ecb7e78756478248311395 /player/loadfile.c
parent3d1cc17ab27b98294f5710e69250e95347d84598 (diff)
downloadmpv-fedaad8250b9c9e262da3cda2114ccf5b62703a3.tar.bz2
mpv-fedaad8250b9c9e262da3cda2114ccf5b62703a3.tar.xz
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).
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c2
1 files changed, 2 insertions, 0 deletions
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 };