diff options
author | wm4 <wm4@nowhere> | 2016-09-29 16:12:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-29 16:12:58 +0200 |
commit | c245d04c3767583247b0f8acc4cbaa8f61bafa0f (patch) | |
tree | df8e93618092cc0682cb2427d518f8f7cddb73b7 /video/mp_image.c | |
parent | f549cec0aceba4721d69b3ebdcd72a93f1c2c122 (diff) | |
download | mpv-c245d04c3767583247b0f8acc4cbaa8f61bafa0f.tar.bz2 mpv-c245d04c3767583247b0f8acc4cbaa8f61bafa0f.tar.xz |
mp_image: fix clearing to black with p010 format
Using vf_expand (which uses mp_image_clear()) with p010 cleared chroma
to green instead.
Diffstat (limited to 'video/mp_image.c')
-rw-r--r-- | video/mp_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |