[MPlayer-cvslog] r36310 - trunk/libvo/gl_common.c
reimar
subversion at mplayerhq.hu
Sun Jun 9 12:13:08 CEST 2013
Author: reimar
Date: Sun Jun 9 12:13:08 2013
New Revision: 36310
Log:
Fully uninitialize EGL.
Unfortunately that doesn't seem to help against the insane number
of memory leaks reported inside MESA EGL by valgrind.
Modified:
trunk/libvo/gl_common.c
Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c Sun Jun 9 12:09:41 2013 (r36309)
+++ trunk/libvo/gl_common.c Sun Jun 9 12:13:08 2013 (r36310)
@@ -2561,13 +2561,18 @@ static int setGlWindow_egl(MPGLContext *
*/
static void releaseGlContext_egl(MPGLContext *ctx) {
EGLContext *context = &ctx->context.egl;
- if (*context != EGL_NO_CONTEXT)
- {
+ if (*context != EGL_NO_CONTEXT) {
mpglFinish();
eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(eglDisplay, *context);
}
*context = EGL_NO_CONTEXT;
+ if (eglSurface != EGL_NO_SURFACE)
+ eglDestroySurface(eglDisplay, eglSurface);
+ eglSurface = EGL_NO_SURFACE;
+ if (eglDisplay != EGL_NO_DISPLAY)
+ eglTerminate(eglDisplay);
+ eglDisplay = EGL_NO_DISPLAY;
}
static void swapGlBuffers_egl(MPGLContext *ctx) {
More information about the MPlayer-cvslog
mailing list