summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-25 11:21:54 +0100
committerwm4 <wm4@nowhere>2016-02-25 11:21:54 +0100
commitb4bbfea71d96836e18586c9328a9c59544717d44 (patch)
treee7bc0b9f649707de7cecd7858684b4271e78148c /player/playloop.c
parent174ca8b17298a017759c64ba6012e2ab3689c8e8 (diff)
downloadmpv-b4bbfea71d96836e18586c9328a9c59544717d44.tar.bz2
mpv-b4bbfea71d96836e18586c9328a9c59544717d44.tar.xz
player: fix --force-window behavior
_Of course_ the previous commit broke --force-window behavior (like it does every single time I touch it). vo_has_frame() gets cleared after a seek, so e.g. stopping playback of a file and going to the next by keeping the seek key down will enter a short moment without video at the end of the first file, which will set the stalled_video variable to true. Prevent it by using the indication whether the window was properly created (which is probably exactly what we want here). This function is also responsible for destroying the window when needed, and obviously we should never do that while video is active. (This is the actual bug, although the other change in this commit already hides the common breakage it caused.)
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c
index aceadd99e7..f83547d019 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -774,14 +774,14 @@ int handle_force_window(struct MPContext *mpctx, bool force)
// decoded on it, then create the window.
bool stalled_video = mpctx->playback_initialized && mpctx->restart_complete &&
mpctx->video_status == STATUS_EOF && mpctx->vo_chain &&
- !vo_has_frame(mpctx->video_out);
+ !mpctx->video_out->config_ok;
// Don't interfere with real video playback
if (mpctx->vo_chain && !stalled_video)
return 0;
if (!mpctx->opts->force_vo) {
- if (act)
+ if (act && !mpctx->vo_chain)
uninit_video_out(mpctx);
return 0;
}