video-info: encoded format can have RGB color-matrix (Fixes #1435)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1435>
This commit is contained in:
Célestin Marot 2021-12-10 15:51:51 +01:00 committed by Nicolas Dufresne
parent c60ac7a04b
commit cabff7a20f

View file

@ -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);