History

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.

Guido Cella committed 2 years ago

Commit 021c5de1 parent 88f20a71 file · +2 −1Browse files

Unified · Split

player/playloop.c+2−1
@@ -1206,7 +1206,8 @@ static void handle_eof(struct MPContext *mpctx) · 1205 unmodified lines
1206 * other hand, if we don't have a video frame, then the user probably seeked1206 * other hand, if we don't have a video frame, then the user probably seeked
1207 * outside of the video, and we do want to quit. */1207 * outside of the video, and we do want to quit. */
1208 bool prevent_eof =1208 bool prevent_eof =
1209 mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out);1209 mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out) &&
1210 !mpctx->vo_chain->is_coverart;
1210 /* It's possible for the user to simultaneously switch both audio1211 /* It's possible for the user to simultaneously switch both audio
1211 * and video streams to "disabled" at runtime. Handle this by waiting1212 * and video streams to "disabled" at runtime. Handle this by waiting
1212 * rather than immediately stopping playback due to EOF.1213 * rather than immediately stopping playback due to EOF.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t