summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-30 17:40:21 +0100
committerwm4 <wm4@nowhere>2019-12-30 17:40:21 +0100
commitfcf0b80dc9dd3ed29e45451bda6315ce0c2b4729 (patch)
tree79ad8f8dad74db74e94a3f1b78d8ca1ac516ce16
parenta6d8e9b7ff0166ee6db69c41c0cfc319e03f4c80 (diff)
downloadmpv-fcf0b80dc9dd3ed29e45451bda6315ce0c2b4729.tar.bz2
mpv-fcf0b80dc9dd3ed29e45451bda6315ce0c2b4729.tar.xz
player: make unpausing directly after seek work with --keep-open
When using --keep-open, and the end of the file is reached, the player's "pause" property is set to true. Attempting to set it to false reverts it back to true immediately. That's how it's designed, for better or worse. Running "seek -10 ; set pause no" did not work, because the seek is first queued and pause is unset, but then the decoding functions determine that EOF is still a thing, and "mpctx->stop_play = AT_END_OF_FILE;" is set again. handle_keep_open() then sets pause again. Only then the seek is actually run. Fix this by not setting stop_play if a seek is queued.
-rw-r--r--player/playloop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 4ae1864cb9..86738e4ed0 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -1170,6 +1170,9 @@ static void handle_playback_restart(struct MPContext *mpctx)
static void handle_eof(struct MPContext *mpctx)
{
+ if (mpctx->seek.type)
+ return;
+
/* Don't quit while paused and we're displaying the last video frame. On the
* other hand, if we don't have a video frame, then the user probably seeked
* outside of the video, and we do want to quit. */