diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/img_format.c | 2 | ||||
-rw-r--r-- | video/img_format.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/video/img_format.c b/video/img_format.c index a6d92f1a1f..32c8a8a048 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -186,7 +186,7 @@ static struct mp_imgfmt_desc get_avutil_fmt(enum PixelFormat fmt) desc.flags |= MP_IMGFLAG_ALPHA; #endif - if (desc.num_planes > 1) + if (desc.num_planes == pd->nb_components) desc.flags |= MP_IMGFLAG_PLANAR; if (desc.flags & MP_IMGFLAG_YUV) { diff --git a/video/img_format.h b/video/img_format.h index 37ac32ffac..2c99c8363e 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -35,7 +35,7 @@ #define MP_IMGFLAG_BYTE_ALIGNED 0x1 // set if (possibly) alpha is included (might be not definitive for packed RGB) #define MP_IMGFLAG_ALPHA 0x80 -// set if number of planes > 1 +// Uses one component per plane (set even if it's just one plane) #define MP_IMGFLAG_PLANAR 0x100 // set if it's YUV colorspace #define MP_IMGFLAG_YUV 0x200 |