summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-24 15:34:39 +0200
committerwm4 <wm4@nowhere>2014-10-24 15:34:39 +0200
commit96b339fc07a22f8ffbc8f86411fefd032066a144 (patch)
tree83876fa9024a007ef35d294af4b1752b3c2c53b3 /player
parentf4ad398b28c603ffc51613642a5c35a5ab936351 (diff)
downloadmpv-96b339fc07a22f8ffbc8f86411fefd032066a144.tar.bz2
mpv-96b339fc07a22f8ffbc8f86411fefd032066a144.tar.xz
player: disable --force-window if VO fails
Otherwise, it'd retry creating the window all the time.
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 9f0fb58313..0fc14f9b31 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -837,7 +837,11 @@ void handle_force_window(struct MPContext *mpctx, bool reconfig)
.w = w, .h = h,
.d_w = w, .d_h = h,
};
- vo_reconfig(vo, &p, 0);
+ if (vo_reconfig(vo, &p, 0) < 0) {
+ mpctx->opts->force_vo = 0;
+ uninit_video_out(mpctx);
+ return;
+ }
vo_control(vo, VOCTRL_RESTORE_SCREENSAVER, NULL);
vo_set_paused(vo, true);
vo_redraw(vo);