diff options
author | 2013-05-01 23:58:48 +0200 | |
---|---|---|
committer | 2013-05-04 01:32:23 +0200 | |
commit | 16d40828aecf4028acadeeecaf0294756298f970 (patch) | |
tree | d566497e3c090d5d1387381bc4f8c71f167904c2 | |
parent | 767cbb77ed62023002374185810ea0c1fd9d41b8 (diff) |
video: fix setting XYZ flag
Commit 9e0b68a didn't really do this correctly, failure at basic logic.
-rw-r--r-- | video/img_format.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/img_format.c b/video/img_format.c index 46b5d7a250..06fd8e7799 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -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; } |