mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 06:03:45 +01:00
fixed image format detection for 15 bit color depths
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27796 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
491826b4cd
commit
fe44156133
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user