# HG changeset patch # User reimar # Date 1228510243 0 # Node ID 4d76c7e31760336b28aec0931926b4ee89420177 # Parent a318969a4f45cbe83d2a9964b99720698f38201f Simplify, do not duplicate buffer size calculation diff -r a318969a4f45 -r 4d76c7e31760 libvo/vo_gl.c --- a/libvo/vo_gl.c Fri Dec 05 19:01:49 2008 +0000 +++ b/libvo/vo_gl.c Fri Dec 05 20:50:43 2008 +0000 @@ -698,9 +698,9 @@ 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, + gl_buffersize = mpi->stride[0] * mpi->height; + BufferData(GL_PIXEL_UNPACK_BUFFER, gl_buffersize, NULL, GL_DYNAMIC_DRAW); - gl_buffersize = mpi->stride[0] * mpi->height; } if (!gl_bufferptr) gl_bufferptr = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);