[MPlayer-cvslog] r35196 - trunk/libvo/gl_common.c

cehoyos subversion at mplayerhq.hu
Fri Sep 14 16:18:15 CEST 2012


Author: cehoyos
Date: Fri Sep 14 16:18:14 2012
New Revision: 35196

Log:
gl_common: fix wrong gl_type for uyvy and yuy2 in little endian

Patch by Xidorn Quan, quanxunzhen gmail

Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Fri Sep 14 16:16:08 2012	(r35195)
+++ trunk/libvo/gl_common.c	Fri Sep 14 16:18:14 2012	(r35196)
@@ -311,7 +311,11 @@ int glFindFormat(uint32_t fmt, int *bpp,
       *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


More information about the MPlayer-cvslog mailing list