diff options
author | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-10-17 10:01:44 +0000 |
---|---|---|
committer | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-10-17 10:01:44 +0000 |
commit | fe44156133130e00e2843ccc01c6d005cea07c1d (patch) | |
tree | 6af646ea72cda48694c6097a017652ee883227e5 /libvo/vo_x11.c | |
parent | 491826b4cd7593bb365ae40c16bef60687eddffa (diff) | |
download | mpv-fe44156133130e00e2843ccc01c6d005cea07c1d.tar.bz2 mpv-fe44156133130e00e2843ccc01c6d005cea07c1d.tar.xz |
fixed image format detection for 15 bit color depths
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27796 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r-- | libvo/vo_x11.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 && |