# HG changeset patch # User cehoyos # Date 1347632294 0 # Node ID d0909b13984fcf77cb4d1e9db2184b917e34e556 # Parent 3e1a4184b70e9e6c30963a77f2575330377a3115 gl_common: fix wrong gl_type for uyvy and yuy2 in little endian Patch by Xidorn Quan, quanxunzhen gmail diff -r 3e1a4184b70e -r d0909b13984f libvo/gl_common.c --- a/libvo/gl_common.c Fri Sep 14 14:16:08 2012 +0000 +++ b/libvo/gl_common.c Fri Sep 14 14:18:14 2012 +0000 @@ -311,7 +311,11 @@ *gl_texfmt = GL_RGB; *bpp = 16; *gl_format = GL_YCBCR_422_APPLE; +#if HAVE_BIGENDIAN *gl_type = fmt == IMGFMT_YUY2 ? GL_UNSIGNED_SHORT_8_8 : GL_UNSIGNED_SHORT_8_8_REV; +#else + *gl_type = fmt == IMGFMT_UYVY ? GL_UNSIGNED_SHORT_8_8 : GL_UNSIGNED_SHORT_8_8_REV; +#endif break; #if 0 // we do not support palettized formats, although the format the