diff options
author | wm4 <wm4@nowhere> | 2014-08-29 19:13:25 +0200 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-08-31 00:19:40 +0200 |
commit | c269fa1609c1bcdfb5be36ded8d963627f6ed12a (patch) | |
tree | c6c16863285e81fadc8251d34479c74248510d44 | |
parent | 0f1d6c09e075dab737b78cca06015d8821550cd3 (diff) | |
download | mpv-c269fa1609c1bcdfb5be36ded8d963627f6ed12a.tar.bz2 mpv-c269fa1609c1bcdfb5be36ded8d963627f6ed12a.tar.xz |
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
-rw-r--r-- | player/playloop.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/player/playloop.c b/player/playloop.c index 1475d3b700..7ab2adde30 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -899,12 +899,11 @@ void run_playloop(struct MPContext *mpctx) update_osd_msg(mpctx); update_subtitles(mpctx); - /* If we're paused, don't end playback yet. But if video is enabled, is EOF, - * and we don't have a video frame, then the user probably seeked outside - * of the video, and we want to quit. */ - bool prevent_eof = mpctx->paused; - if (mpctx->d_video && mpctx->video_status == STATUS_EOF) - prevent_eof &= mpctx->video_out && mpctx->video_out->hasframe; + /* 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. */ + bool prevent_eof = + mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out); /* Handles terminating on end of playback (or switching to next segment). * * It's possible for the user to simultaneously switch both audio |