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
This commit is contained in:
Mathieu Duponchelle 2017-08-11 20:53:21 +02:00
parent d375a28a37
commit 28943c4399

View file

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