summaryrefslogtreecommitdiffstats
path: root/video/img_format.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-06 20:54:23 +0200
committerwm4 <wm4@nowhere>2013-05-06 23:11:10 +0200
commitb34338ac6f3d75c0aa9e85d72a428752db46d163 (patch)
tree7514eae2fcaea2557510cb6e168e47de0f02112e /video/img_format.c
parent2cd1a8286b55e183e5cf64c328c3ce8d9a6226fa (diff)
downloadmpv-b34338ac6f3d75c0aa9e85d72a428752db46d163.tar.bz2
mpv-b34338ac6f3d75c0aa9e85d72a428752db46d163.tar.xz
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.)
Diffstat (limited to 'video/img_format.c')
-rw-r--r--video/img_format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/img_format.c b/video/img_format.c
index 06fd8e7799..c0bbce90ee 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -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 {