mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
img_format: fix broken condition
This caused all formats with fewer than 8 bits per component marked as little endian. (Normally, only some messed up packed RGB formats are endian-specific in this case.)
This commit is contained in:
parent
2cd1a8286b
commit
b34338ac6f
@ -185,7 +185,7 @@ static struct mp_imgfmt_desc get_avutil_fmt(enum PixelFormat fmt)
|
||||
// Packed RGB formats are the only formats that have less than 8 bits per
|
||||
// component, and still require endian dependent access.
|
||||
if (pd->comp[0].depth_minus1 + 1 <= 8 &&
|
||||
!(mpfmt >= IMGFMT_RGB12_LE || mpfmt <= IMGFMT_BGR16_BE))
|
||||
!(mpfmt >= IMGFMT_RGB12_LE && mpfmt <= IMGFMT_BGR16_BE))
|
||||
{
|
||||
desc.flags |= MP_IMGFLAG_LE | MP_IMGFLAG_BE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user