summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_x11.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/gl_x11.c b/video/out/gl_x11.c
index eeaa01f94c..9226356b66 100644
--- a/video/out/gl_x11.c
+++ b/video/out/gl_x11.c
@@ -257,7 +257,10 @@ static bool config_window_x11(struct MPGLContext *ctx, int flags)
static int glx_init(struct MPGLContext *ctx, int vo_flags)
{
- return vo_x11_init(ctx->vo) && config_window_x11(ctx, vo_flags) ? 0 : -1;
+ if (vo_x11_init(ctx->vo) && config_window_x11(ctx, vo_flags))
+ return 0;
+ vo_x11_uninit(ctx->vo);
+ return -1;
}
static int glx_reconfig(struct MPGLContext *ctx, int flags)