From 3d40e2f5473ed7f6e1e60cb16983e54b797ba9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 20 Aug 2021 11:57:14 +0300 Subject: [PATCH] Don't include chroma-site and colorimetry in generic template caps --- gstajacommon.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gstajacommon.cpp b/gstajacommon.cpp index 440408002e..ce1b01cd49 100644 --- a/gstajacommon.cpp +++ b/gstajacommon.cpp @@ -244,10 +244,21 @@ bool gst_video_info_from_aja_video_format(GstVideoInfo *info, GstCaps *gst_ntv2_video_format_to_caps(NTV2VideoFormat format) { GstVideoInfo info; + GstCaps *caps; if (!gst_video_info_from_ntv2_video_format(&info, format)) return NULL; - return gst_video_info_to_caps(&info); + caps = gst_video_info_to_caps(&info); + if (!caps) return caps; + + guint n = gst_caps_get_size(caps); + for (guint i = 0; i < n; i++) { + GstStructure *s = gst_caps_get_structure(caps, i); + + gst_structure_remove_fields(s, "chroma-site", "colorimetry", NULL); + } + + return caps; } bool gst_video_info_from_ntv2_video_format(GstVideoInfo *info,