summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-07-09 18:32:51 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-07-09 18:32:51 +0300
commitca3feba5c339f12141bf335e5592967caccc290b (patch)
tree06ec4960d34fd7a50c6efb80f8e017b2f4ab5d99 /libvo
parent8ea134bd23022afbe1a06c0241c0c2c6ea2618f8 (diff)
parent8760b0cb71dc6aa9c08d926712e64218931a1782 (diff)
downloadmpv-ca3feba5c339f12141bf335e5592967caccc290b.tar.bz2
mpv-ca3feba5c339f12141bf335e5592967caccc290b.tar.xz
Merge svn changes up to r27242
Conflicts: Makefile configure
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index d2eae5c363..d75b7b933f 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -688,14 +688,17 @@ static uint32_t get_image(mp_image_t *mpi) {
return VO_FALSE;
}
if (mpi->flags & MP_IMGFLAG_READABLE) return VO_FALSE;
- if (!gl_buffer)
- GenBuffers(1, &gl_buffer);
- BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer);
if (ati_hack) {
int s = 1;
+ // for unexplainable reasons, with width < 512 chroma tends to be messed up
+ // (after ca. 2/3 the previous line repeats all over)
+ if (mpi->width < 512) return VO_FALSE;
while (s < mpi->width) s *= 2;
mpi->width = s;
}
+ if (!gl_buffer)
+ GenBuffers(1, &gl_buffer);
+ 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,