summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-12 23:49:00 +0100
committerwm4 <wm4@nowhere>2016-01-12 23:49:00 +0100
commite420464ba693a5920d4dc172b3f7e9a0c725e3d4 (patch)
treee149445377e94da3274f7d3f588449ed24ece3c1 /player/loadfile.c
parent6fc0fe4426c1b71630d281cbc9e0406f8ad7deee (diff)
downloadmpv-e420464ba693a5920d4dc172b3f7e9a0c725e3d4.tar.bz2
mpv-e420464ba693a5920d4dc172b3f7e9a0c725e3d4.tar.xz
player: simplify backstepping
Basically reimplement it. The old implementation was quite stupid, and was probably done this way because video filtering and output used to be way less decoupled. Now we can reimplement it in a very simple way: when backstepping, seek to current time, but keep the last frame that was supposed to be discarded when reaching the target time. When the seek finishes, prepend the saved frame to the video frame queue. A disadvantage is that the new implementation fails to skip over timeline boundaries (ordered chapters etc.), but this never worked properly anyway. It's possible that this will be fixed some time in the future.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index cdf3d5b0f8..ee555ed421 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1044,7 +1044,6 @@ static void play_current_file(struct MPContext *mpctx)
mpctx->paused = false;
mpctx->paused_for_cache = false;
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;