lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MPlayer-dev-eng] [PATCH] fix vo x11 in 15 bit color depth
- Date: Wed, 15 Oct 2008 22:15:50 +0200
- From: Sascha Sommer <saschasommer@xxxxxxxxxx>
- Subject: [MPlayer-dev-eng] [PATCH] fix vo x11 in 15 bit color depth
Hi,
while testing xvidix with my riva128 I noticed that MPlayer's vo_x11 no longer
works with 15 bit color depths.
Format selection fails because the X server reports bit depth 16 for 15 bit
formats.
Attached patch adds a workaround.
Ok to commit?
Regards
Sascha
Index: libvo/vo_x11.c
===================================================================
--- libvo/vo_x11.c (revision 27776)
+++ libvo/vo_x11.c (working copy)
@@ -480,7 +480,13 @@
}
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 &&
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng