1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:42:17 +00:00

video: fix setting XYZ flag

Commit 9e0b68a didn't really do this correctly, failure at basic logic.
This commit is contained in:
wm4 2013-05-01 23:58:48 +02:00
parent 767cbb77ed
commit 16d40828ae

View File

@ -194,12 +194,12 @@ static struct mp_imgfmt_desc get_avutil_fmt(enum PixelFormat fmt)
desc.plane_bits = planedepth[0];
if (!(pd->flags & PIX_FMT_RGB) && fmt != PIX_FMT_MONOBLACK &&
fmt != PIX_FMT_PAL8)
if (mpfmt == IMGFMT_XYZ12_LE || mpfmt == IMGFMT_XYZ12_BE) {
desc.flags |= MP_IMGFLAG_XYZ;
} else if (!(pd->flags & PIX_FMT_RGB) && fmt != PIX_FMT_MONOBLACK &&
fmt != PIX_FMT_PAL8)
{
desc.flags |= MP_IMGFLAG_YUV;
} else if (mpfmt == IMGFMT_XYZ12_LE || mpfmt == IMGFMT_XYZ12_BE) {
desc.flags |= MP_IMGFLAG_XYZ;
} else {
desc.flags |= MP_IMGFLAG_RGB;
}