summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-20 15:21:01 +0200
committerwm4 <wm4@nowhere>2015-08-20 15:21:01 +0200
commit895c8801a2c9915784ee043cb805ede2da9b11c9 (patch)
tree21e7d5374c980851ed90f3ff976b6ee61c88cf12
parent0d5541af47c3680094364322883d0a81ff5a8cc1 (diff)
downloadmpv-895c8801a2c9915784ee043cb805ede2da9b11c9.tar.bz2
mpv-895c8801a2c9915784ee043cb805ede2da9b11c9.tar.xz
gl_rpi: destroy the EGLSurface too
Most likely doesn't matter much.
-rw-r--r--video/out/gl_rpi.c7
1 files 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);