# HG changeset patch # User reimar # Date 1270410172 0 # Node ID 8a443793daef169a6f79775ded0bc004e47799e1 # Parent 6daa73f57ced48a4caa5360f9035469359d8f23e Avoid duplicating a condition. diff -r 6daa73f57ced -r 8a443793daef libvo/vo_gl2.c --- a/libvo/vo_gl2.c Sun Apr 04 19:39:54 2010 +0000 +++ b/libvo/vo_gl2.c Sun Apr 04 19:42:52 2010 +0000 @@ -198,8 +198,9 @@ 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 @@ 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