[MPlayer-cvslog] r38376 - trunk/libvo/gl_common.c

reimar subversion at mplayerhq.hu
Fri Aug 26 14:36:56 EEST 2022


Author: reimar
Date: Fri Aug 26 14:36:55 2022
New Revision: 38376

Log:
gl_common: set vinfo in the context.

Prevents leaking vinfo memory.

Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Fri Aug 26 13:32:55 2022	(r38375)
+++ trunk/libvo/gl_common.c	Fri Aug 26 14:36:55 2022	(r38376)
@@ -2809,13 +2809,13 @@ int mpglcontext_create_window(MPGLContex
       }
       else
 #endif
-      vinfo = glXChooseVisual(mDisplay, mScreen, stereo_glx_attribs);
+      ctx->vinfo.x11 = vinfo = glXChooseVisual(mDisplay, mScreen, stereo_glx_attribs);
       if (!vinfo)
         mp_msg(MSGT_VO, MSGL_ERR, "[gl] Could not find a stereo visual, "
                                   "3D will probably not work!\n");
     }
     if (!vinfo)
-      vinfo = glXChooseVisual(mDisplay, mScreen, default_glx_attribs);
+      ctx->vinfo.x11 = vinfo = glXChooseVisual(mDisplay, mScreen, default_glx_attribs);
     if (!vinfo) {
       mp_msg(MSGT_VO, MSGL_ERR, "[gl] no GLX support present\n");
       return -1;


More information about the MPlayer-cvslog mailing list