summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-07-05 02:55:56 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-07-05 02:55:56 +0300
commit8ea134bd23022afbe1a06c0241c0c2c6ea2618f8 (patch)
tree9e9fcbd8af8e82dd189beebc7bd4ed1e52b1fd87 /libvo
parent7de350c673e1c0ae52d655e322a072f2f6b624b0 (diff)
parent6d14167f28b453a4410701cfeb87f7d9c18f869a (diff)
downloadmpv-8ea134bd23022afbe1a06c0241c0c2c6ea2618f8.tar.bz2
mpv-8ea134bd23022afbe1a06c0241c0c2c6ea2618f8.tar.xz
Merge svn changes up to r27202
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index f528bf0233..d2eae5c363 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -691,8 +691,11 @@ static uint32_t get_image(mp_image_t *mpi) {
if (!gl_buffer)
GenBuffers(1, &gl_buffer);
BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer);
- if (ati_hack)
- mpi->width = (mpi->width + 63) & ~63;
+ if (ati_hack) {
+ int s = 1;
+ while (s < mpi->width) s *= 2;
+ mpi->width = s;
+ }
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,