From cabff7a20fecc625d26a2d6cce7df65d93d6827e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9lestin=20Marot?= Date: Fri, 10 Dec 2021 15:51:51 +0100 Subject: [PATCH] video-info: encoded format can have RGB color-matrix (Fixes #1435) Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c index 8b3064d88c..da4d6bfd48 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c @@ -186,8 +186,9 @@ validate_colorimetry (GstVideoInfo * info) { const GstVideoFormatInfo *finfo = info->finfo; - if (!GST_VIDEO_FORMAT_INFO_IS_RGB (finfo) && - info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_RGB) { + if ((GST_VIDEO_FORMAT_INFO_IS_YUV (finfo) + || GST_VIDEO_FORMAT_INFO_IS_GRAY (finfo)) + && info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_RGB) { GST_WARNING ("color matrix RGB is only supported with RGB format, %s is not", finfo->name);