mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +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:
parent
efe43d768f
commit
85576f31a9
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user