From 28943c4399d51b5077375e1e38abd1ac810722f5 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 11 Aug 2017 20:53:21 +0200 Subject: [PATCH] videoutilsprivate: fill more video fields. __gst_video_element_proxy_caps is called by __gst_video_element_proxy_getcaps with caps set to the caps allowed downstream. As we didn't set colorimetry or chroma-site on the resulting caps, upstream considered it possible to use whatever values it wanted, leading to not negotiated errors later on. As the description for that function is: "Takes caps and copies its video fields to tmpl_caps", it seems legitimate to set these fields there. https://bugzilla.gnome.org/show_bug.cgi?id=786172 --- gst-libs/gst/video/gstvideoutilsprivate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/video/gstvideoutilsprivate.c b/gst-libs/gst/video/gstvideoutilsprivate.c index e5e7c2dd80..68631c8d3f 100644 --- a/gst-libs/gst/video/gstvideoutilsprivate.c +++ b/gst-libs/gst/video/gstvideoutilsprivate.c @@ -58,6 +58,10 @@ __gst_video_element_proxy_caps (GstElement * element, GstCaps * templ_caps, gst_structure_set_value (s, "framerate", val); if ((val = gst_structure_get_value (caps_s, "pixel-aspect-ratio"))) gst_structure_set_value (s, "pixel-aspect-ratio", val); + if ((val = gst_structure_get_value (caps_s, "colorimetry"))) + gst_structure_set_value (s, "colorimetry", val); + if ((val = gst_structure_get_value (caps_s, "chroma-site"))) + gst_structure_set_value (s, "chroma-site", val); gst_caps_append_structure_full (tmp, s, gst_caps_features_copy (features));