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).
This commit is contained in:
wm4 2015-09-20 23:03:00 +02:00
parent 8782354e6d
commit 7a19eb490e
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}