From 5fd4e3e0b6cc4f30d7b1489a105db946b43f1a9f Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Thu, 15 Jan 2015 13:54:14 +1100 Subject: [PATCH] videoutils: keep caps features in account when building the downstream filter See 00c2ce6 and https://bugzilla.gnome.org/show_bug.cgi?id=741263 for reference. --- gst-libs/gst/video/gstvideoutilsprivate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideoutilsprivate.c b/gst-libs/gst/video/gstvideoutilsprivate.c index 11a09d2a6d..652c60d12e 100644 --- a/gst-libs/gst/video/gstvideoutilsprivate.c +++ b/gst-libs/gst/video/gstvideoutilsprivate.c @@ -41,11 +41,13 @@ __gst_video_element_proxy_caps (GstElement * element, GstCaps * templ_caps, for (i = 0; i < templ_caps_size; i++) { GQuark q_name = gst_structure_get_name_id (gst_caps_get_structure (templ_caps, i)); + GstCapsFeatures *features = gst_caps_get_features (templ_caps, i); for (j = 0; j < caps_size; j++) { const GstStructure *caps_s = gst_caps_get_structure (caps, j); const GValue *val; GstStructure *s; + GstCaps *tmp = gst_caps_new_empty (); s = gst_structure_new_id_empty (q_name); if ((val = gst_structure_get_value (caps_s, "width"))) @@ -57,7 +59,9 @@ __gst_video_element_proxy_caps (GstElement * element, GstCaps * templ_caps, if ((val = gst_structure_get_value (caps_s, "pixel-aspect-ratio"))) gst_structure_set_value (s, "pixel-aspect-ratio", val); - result = gst_caps_merge_structure (result, s); + gst_caps_append_structure_full (tmp, s, + gst_caps_features_copy (features)); + result = gst_caps_merge (result, tmp); } }