player: fix quit handling when seeking past EOF while paused

The player didn't quit when seeking past EOF in audio-only mode while
paused. The only case when we don't want to quit is when the last video
frame is displayed while paused.

This logic was probably broken a while ago, but I'm not exactly sure.

CC: @mpv-player/stable

Conflicts:
	player/playloop.c
This commit is contained in:
wm4 2014-08-29 19:13:25 +02:00 committed by Alessandro Ghedini
parent 0f1d6c09e0
commit c269fa1609
1 changed files with 5 additions and 6 deletions

View File

@ -899,12 +899,11 @@ void run_playloop(struct MPContext *mpctx)
update_osd_msg(mpctx); update_osd_msg(mpctx);
update_subtitles(mpctx); update_subtitles(mpctx);
/* If we're paused, don't end playback yet. But if video is enabled, is EOF, /* Don't quit while paused and we're displaying the last video frame. On the
* and we don't have a video frame, then the user probably seeked outside * other hand, if we don't have a video frame, then the user probably seeked
* of the video, and we want to quit. */ * outside of the video, and we do want to quit. */
bool prevent_eof = mpctx->paused; bool prevent_eof =
if (mpctx->d_video && mpctx->video_status == STATUS_EOF) mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out);
prevent_eof &= mpctx->video_out && mpctx->video_out->hasframe;
/* Handles terminating on end of playback (or switching to next segment). /* Handles terminating on end of playback (or switching to next segment).
* *
* It's possible for the user to simultaneously switch both audio * It's possible for the user to simultaneously switch both audio