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.
This commit is contained in:
wm4 2019-12-30 17:40:21 +01:00
parent a6d8e9b7ff
commit fcf0b80dc9
1 changed files with 3 additions and 0 deletions

View File

@ -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. */