[MPlayer-cvslog] CVS: main/libvo vo_gl.c,1.76,1.77

Reimar Döffinger CVS syncmail at mplayerhq.hu
Tue Jul 26 22:36:36 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv31243

Modified Files:
	vo_gl.c 
Log Message:
catch failed buffer allocation


Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- vo_gl.c	26 Jul 2005 13:47:18 -0000	1.76
+++ vo_gl.c	26 Jul 2005 20:36:34 -0000	1.77
@@ -485,6 +485,7 @@
     if (!err_shown)
       mp_msg(MSGT_VO, MSGL_ERR, "[gl] extensions missing for dr\n"
                                 "Expect a _major_ speed penalty\n");
+    err_shown = 1;
     return VO_FALSE;
   }
   if (mpi->flags & MP_IMGFLAG_READABLE) return VO_FALSE;
@@ -498,6 +499,13 @@
   }
   mpi->planes[0] = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
   BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+  if (mpi->planes[0] == NULL) {
+    if (!err_shown)
+      mp_msg(MSGT_VO, MSGL_ERR, "[gl] could not aquire buffer for dr\n"
+                                "Expect a _major_ speed penalty\n");
+    err_shown = 1;
+    return VO_FALSE;
+  }
   mpi->flags |= MP_IMGFLAG_DIRECT;
   return VO_TRUE;
 }




More information about the MPlayer-cvslog mailing list