From 895c8801a2c9915784ee043cb805ede2da9b11c9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 20 Aug 2015 15:21:01 +0200 Subject: gl_rpi: destroy the EGLSurface too Most likely doesn't matter much. --- video/out/gl_rpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/video/out/gl_rpi.c b/video/out/gl_rpi.c index cdcf0584de..0f308ae291 100644 --- a/video/out/gl_rpi.c +++ b/video/out/gl_rpi.c @@ -131,11 +131,14 @@ fail: void mp_egl_rpi_destroy(struct mp_egl_rpi *p) { - if (p->egl_context) { + if (p->egl_display) { eglMakeCurrent(p->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(p->egl_display, p->egl_context); } + if (p->egl_surface) + eglDestroySurface(p->egl_display, p->egl_surface); + if (p->egl_context) + eglDestroyContext(p->egl_display, p->egl_context); p->egl_context = EGL_NO_CONTEXT; if (p->egl_display) eglTerminate(p->egl_display); -- cgit v1.2.3