0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

playloop: don't loop when seeking to the end of cover art while paused

Fix the bug that seeking to the end of cover art while paused goes back
to the beginning of the file because of this condition meant for videos.

This doesn't check mpctx->vo_chain->is_sparse because prevent_eof should
be true with actual sparse videos.
This commit is contained in:
Guido Cella 2024-05-25 23:26:50 +02:00 committed by Dudemanguy
parent 88f20a7011
commit 021c5dedb1

View File

@ -1206,7 +1206,8 @@ static void handle_eof(struct MPContext *mpctx)
* 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. */
bool prevent_eof =
mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out);
mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out) &&
!mpctx->vo_chain->is_coverart;
/* It's possible for the user to simultaneously switch both audio
* and video streams to "disabled" at runtime. Handle this by waiting
* rather than immediately stopping playback due to EOF.