From c245d04c3767583247b0f8acc4cbaa8f61bafa0f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 29 Sep 2016 16:12:58 +0200 Subject: mp_image: fix clearing to black with p010 format Using vf_expand (which uses mp_image_clear()) with p010 cleared chroma to green instead. --- video/mp_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/mp_image.c b/video/mp_image.c index 531565f837..694bea1bf0 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -452,7 +452,7 @@ void mp_image_clear(struct mp_image *img, int x0, int y0, int x1, int y1) plane_clear[0] = av_le2ne16(0x8000); } else if (area.imgfmt == IMGFMT_UYVY) { plane_clear[0] = av_le2ne16(0x0080); - } else if (area.imgfmt == IMGFMT_NV12 || area.imgfmt == IMGFMT_NV21) { + } else if (area.fmt.flags & MP_IMGFLAG_YUV_NV) { plane_clear[1] = 0x8080; } else if (area.fmt.flags & MP_IMGFLAG_YUV_P) { uint16_t chroma_clear = (1 << area.fmt.plane_bits) / 2; -- cgit v1.2.3