[MPlayer-cvslog] r31887 - trunk/libvo/vo_gl.c

reimar subversion at mplayerhq.hu
Sun Aug 1 19:37:38 CEST 2010


Author: reimar
Date: Sun Aug  1 19:37:38 2010
New Revision: 31887

Log:
Use early return instead of large if block.

Modified:
   trunk/libvo/vo_gl.c

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Sun Aug  1 19:36:15 2010	(r31886)
+++ trunk/libvo/vo_gl.c	Sun Aug  1 19:37:38 2010	(r31887)
@@ -760,7 +760,8 @@ static void create_osd_texture(int x0, i
 static void do_render_osd(int type) {
   int draw_osd  = (type & RENDER_OSD)  && osdtexCnt > 0;
   int draw_eosd = (type & RENDER_EOSD) && eosdDispList;
-  if (draw_osd || draw_eosd) {
+  if (!draw_osd && !draw_eosd)
+    return;
     // set special rendering parameters
     if (!scaled_osd) {
       mpglMatrixMode(GL_PROJECTION);
@@ -788,7 +789,6 @@ static void do_render_osd(int type) {
     if (!scaled_osd)
       mpglPopMatrix();
     mpglBindTexture(gl_target, 0);
-  }
 }
 
 static void draw_osd(void)


More information about the MPlayer-cvslog mailing list