[MPlayer-cvslog] r29612 - in trunk/libvo: vo_gl.c vo_gl2.c

reimar subversion at mplayerhq.hu
Tue Sep 1 17:20:05 CEST 2009


Author: reimar
Date: Tue Sep  1 17:20:05 2009
New Revision: 29612

Log:
Check setGlWindow return value to fail properly instead of crashing if e.g.
no OpenGL support is available.

Modified:
   trunk/libvo/vo_gl.c
   trunk/libvo/vo_gl2.c

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Tue Sep  1 17:00:49 2009	(r29611)
+++ trunk/libvo/vo_gl.c	Tue Sep  1 17:20:05 2009	(r29612)
@@ -571,7 +571,8 @@ config(uint32_t width, uint32_t height, 
 glconfig:
   if (vo_config_count)
     uninitGl();
-  setGlWindow(&gl_vinfo, &gl_context, vo_window);
+  if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED)
+    return -1;
   initGl(vo_dwidth, vo_dheight);
 
   return 0;

Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	Tue Sep  1 17:00:49 2009	(r29611)
+++ trunk/libvo/vo_gl2.c	Tue Sep  1 17:20:05 2009	(r29612)
@@ -637,7 +637,8 @@ config(uint32_t width, uint32_t height, 
 #endif
     return -1;
 
-  setGlWindow(&gl_vinfo, &gl_context, vo_window);
+  if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED)
+    return -1;
 
   glVersion = glGetString(GL_VERSION);
 


More information about the MPlayer-cvslog mailing list