From b34338ac6f3d75c0aa9e85d72a428752db46d163 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 May 2013 20:54:23 +0200 Subject: 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.) --- video/img_format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') 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 { -- cgit v1.2.3