# HG changeset patch # User faust3 # Date 1224237704 0 # Node ID 7efce8fe3a0475ba57841a8efb4860719c74ad4e # Parent b9bf90af1ceb5c67ad40b02d6ee3b271edd393ac fixed image format detection for 15 bit color depths diff -r b9bf90af1ceb -r 7efce8fe3a04 libvo/vo_x11.c --- a/libvo/vo_x11.c Thu Oct 16 20:44:05 2008 +0000 +++ b/libvo/vo_x11.c Fri Oct 17 10:01:44 2008 +0000 @@ -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 &&