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

reimar subversion at mplayerhq.hu
Mon Jun 5 22:21:25 CEST 2006


Author: reimar
Date: Mon Jun  5 22:21:25 2006
New Revision: 18585

Modified:
   trunk/libvo/vo_gl2.c

Log:
Avoid crash with e.g. -vo gl2:yuv=2 when no fragment program functions are available
Fix "ported" from vo_gl.c


Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	(original)
+++ trunk/libvo/vo_gl2.c	Mon Jun  5 22:21:25 2006
@@ -765,6 +765,10 @@
         glBindTexture(GL_TEXTURE_2D, 0);
       case YUV_CONVERSION_FRAGMENT_POW:
       case YUV_CONVERSION_FRAGMENT:
+        if (!GenPrograms || !BindProgram) {
+          mp_msg(MSGT_VO, MSGL_ERR, "[gl] fragment program functions missing!\n");
+          break;
+        }
         GenPrograms(1, &fragprog);
         BindProgram(GL_FRAGMENT_PROGRAM, fragprog);
         break;



More information about the MPlayer-cvslog mailing list