1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-20 22:02:59 +00:00

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 57fbc9cd76 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.
This commit is contained in:
wm4 2020-02-28 15:41:45 +01:00
parent efe43d768f
commit 85576f31a9

View File

@ -1179,14 +1179,17 @@ static void handle_playback_restart(struct MPContext *mpctx)
mp_wakeup_core(mpctx); mp_wakeup_core(mpctx);
update_ab_loop_clip(mpctx); update_ab_loop_clip(mpctx);
MP_VERBOSE(mpctx, "playback restart complete @ %f\n", mpctx->playback_pts); 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) 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 /* 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 * 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. */ * outside of the video, and we do want to quit. */