summaryrefslogtreecommitdiffstats
path: root/video/out/gl_wayland.c
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-08 20:58:32 +0100
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-08 20:59:40 +0100
commit4b102550089294a6fb4cdf3b4e133f21f16d3922 (patch)
tree2d93cb970c52c3b7cb525a61a0f2ba6b67440e5e /video/out/gl_wayland.c
parent0b1ba0bf64771167fbc31e08fb5853504390f03f (diff)
downloadmpv-4b102550089294a6fb4cdf3b4e133f21f16d3922.tar.bz2
mpv-4b102550089294a6fb4cdf3b4e133f21f16d3922.tar.xz
wayland: fix memory leaks
There are still some leaks from wayland-cursor stuff, but there is no way to free the memory as user of the cursor library.
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;
}