mirror of https://github.com/mpv-player/mpv
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:
parent
8782354e6d
commit
7a19eb490e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue