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

reimar subversion at mplayerhq.hu
Fri Dec 5 21:50:43 CET 2008


Author: reimar
Date: Fri Dec  5 21:50:43 2008
New Revision: 28098

Log:
Simplify, do not duplicate buffer size calculation


Modified:
   trunk/libvo/vo_gl.c

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	(original)
+++ trunk/libvo/vo_gl.c	Fri Dec  5 21:50:43 2008
@@ -698,9 +698,9 @@ static uint32_t get_image(mp_image_t *mp
   BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer);
   mpi->stride[0] = mpi->width * mpi->bpp / 8;
   if (mpi->stride[0] * mpi->height > gl_buffersize) {
-    BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->height,
-               NULL, GL_DYNAMIC_DRAW);
     gl_buffersize = mpi->stride[0] * mpi->height;
+    BufferData(GL_PIXEL_UNPACK_BUFFER, gl_buffersize,
+               NULL, GL_DYNAMIC_DRAW);
   }
   if (!gl_bufferptr)
     gl_bufferptr = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);



More information about the MPlayer-cvslog mailing list