From 7a19eb490e3e2b525acd54e774217c64f6df41d9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 20 Sep 2015 23:03:00 +0200 Subject: player: do not destroy VO prematurely when initializing playback If --force-window wasn't used, this would destroy the VO while a file is still being loaded, resulting in flicker and other interruptions when switching from one playlist entry to another. Recent regression. The condition used here is pretty tricky, but it boils down to that it should trigger either in idle mode, or when loading has been fully done (at these points we definitely know whether the VO will be needed). --- player/playloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 4bd394ffda..351787d957 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -872,7 +872,8 @@ int handle_force_window(struct MPContext *mpctx, bool reconfig) return 0; if (!mpctx->opts->force_vo) { - uninit_video_out(mpctx); + if (!mpctx->playing || mpctx->playback_initialized) + uninit_video_out(mpctx); return 0; } -- cgit v1.2.3