diff options
author | wm4 <wm4@nowhere> | 2016-02-25 11:21:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-25 11:21:54 +0100 |
commit | b4bbfea71d96836e18586c9328a9c59544717d44 (patch) | |
tree | e7bc0b9f649707de7cecd7858684b4271e78148c /player | |
parent | 174ca8b17298a017759c64ba6012e2ab3689c8e8 (diff) |
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')
-rw-r--r-- | player/playloop.c | 4 |
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; } |