diff options
author | wm4 <wm4@nowhere> | 2020-02-28 15:41:45 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-28 15:41:45 +0100 |
commit | 85576f31a9cc25ca75ac7d265aaaf211f76a4842 (patch) | |
tree | faa266759587ee12456f338571b8a90f18fdb044 /player | |
parent | efe43d768fa4dd13329dfa69831aedbdff948718 (diff) | |
download | mpv-85576f31a9cc25ca75ac7d265aaaf211f76a4842.tar.bz2 mpv-85576f31a9cc25ca75ac7d265aaaf211f76a4842.tar.xz |
player: attempt to fix playback end on hr-seeking past EOF again
This tries to fix #7206 (hr-seeking past EOF does not stop playback)
again. Commit 57fbc9cd76f7 should have fixed this, but trying it again
(using that git revision), it often did not work. Whatever the fuck.
So add another dumb special case that will break within weeks. Note that
the check in handle_eof() had no effect, since execute_queued_seek() is
called later, which cancels EOF in the same case.
Diffstat (limited to 'player')
-rw-r--r-- | player/playloop.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/player/playloop.c b/player/playloop.c index d1a98be306..6c390a76e2 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1179,14 +1179,17 @@ static void handle_playback_restart(struct MPContext *mpctx) mp_wakeup_core(mpctx); update_ab_loop_clip(mpctx); MP_VERBOSE(mpctx, "playback restart complete @ %f\n", mpctx->playback_pts); + + // Continuous seeks past EOF => treat as EOF instead of repeating seek. + if (mpctx->seek.type == MPSEEK_RELATIVE && mpctx->seek.amount > 0 && + mpctx->video_status == STATUS_EOF && + mpctx->audio_status == STATUS_EOF) + mpctx->seek = (struct seek_params){0}; } } 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. */ |