[MPlayer-cvslog] r27796 - trunk/libvo/vo_x11.c

faust3 subversion at mplayerhq.hu
Fri Oct 17 12:01:44 CEST 2008


Author: faust3
Date: Fri Oct 17 12:01:44 2008
New Revision: 27796

Log:
fixed image format detection for 15 bit color depths

Modified:
   trunk/libvo/vo_x11.c

Modified: trunk/libvo/vo_x11.c
==============================================================================
--- trunk/libvo/vo_x11.c	(original)
+++ trunk/libvo/vo_x11.c	Fri Oct 17 12:01:44 2008
@@ -480,7 +480,13 @@ static int config(uint32_t width, uint32
     }
 
     while (fmte->mpfmt) {
-      if (IMGFMT_RGB_DEPTH(fmte->mpfmt) == myximage->bits_per_pixel &&
+      int depth = IMGFMT_RGB_DEPTH(fmte->mpfmt);
+      /* bits_per_pixel in X seems to be set to 16 for 15 bit formats
+         => force depth to 16 so that only the color masks are used for the format check */
+      if (depth == 15)
+          depth = 16;
+
+      if (depth            == myximage->bits_per_pixel &&
           fmte->byte_order == myximage->byte_order &&
           fmte->red_mask   == myximage->red_mask   &&
           fmte->green_mask == myximage->green_mask &&



More information about the MPlayer-cvslog mailing list