summaryrefslogtreecommitdiffstats
path: root/video/out/gl_wayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_wayland.c')
-rw-r--r--video/out/gl_wayland.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c
index 2d4d24ce37..797f1648ac 100644
--- a/video/out/gl_wayland.c
+++ b/video/out/gl_wayland.c
@@ -188,11 +188,12 @@ static void releaseGlContext_wayland(MPGLContext *ctx)
struct vo_wayland_state *wl = ctx->vo->wayland;
gl->Finish();
+ eglReleaseThread();
+ wl_egl_window_destroy(wl->egl_context.egl_window);
+ eglDestroySurface(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
eglMakeCurrent(wl->egl_context.egl.dpy, NULL, NULL, EGL_NO_CONTEXT);
eglDestroyContext(wl->egl_context.egl.dpy, wl->egl_context.egl.ctx);
eglTerminate(wl->egl_context.egl.dpy);
- eglReleaseThread();
- wl_egl_window_destroy(wl->egl_context.egl_window);
wl->egl_context.egl.ctx = NULL;
}