From fe44156133130e00e2843ccc01c6d005cea07c1d Mon Sep 17 00:00:00 2001 From: faust3 Date: Fri, 17 Oct 2008 10:01:44 +0000 Subject: fixed image format detection for 15 bit color depths git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27796 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 2343a16f72..e07b947986 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -480,7 +480,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } 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 && -- cgit v1.2.3