[MPlayer-cvslog] r31011 - trunk/libvo/vo_gl2.c

reimar subversion at mplayerhq.hu
Sun Apr 4 21:42:52 CEST 2010


Author: reimar
Date: Sun Apr  4 21:42:52 2010
New Revision: 31011

Log:
Avoid duplicating a condition.

Modified:
   trunk/libvo/vo_gl2.c

Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	Sun Apr  4 21:39:54 2010	(r31010)
+++ trunk/libvo/vo_gl2.c	Sun Apr  4 21:42:52 2010	(r31011)
@@ -198,8 +198,9 @@ static int initTextures(void)
     glGetTexLevelParameteriv
       (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
 
-    if (format != gl_internal_format)
-    {
+    if (format == gl_internal_format)
+      break;
+
       mp_msg (MSGT_VO, MSGL_V, "[gl2] Needed texture [%dx%d] too big, trying ",
               texture_width, texture_height);
 
@@ -214,9 +215,8 @@ static int initTextures(void)
         mp_msg (MSGT_VO, MSGL_FATAL, "[gl2] Give up .. usable texture size not avaiable, or texture config error !\n");
         return -1;
       }
-    }
   }
-  while (format != gl_internal_format && texture_width > 1 && texture_height > 1);
+  while (texture_width > 1 && texture_height > 1);
 #ifdef TEXTURE_WIDTH
   texture_width = TEXTURE_WIDTH;
 #endif


More information about the MPlayer-cvslog mailing list