From f97ff393581582931317a5492528b577b830ae1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 3 Jan 2023 18:53:41 -0500 Subject: [PATCH] audioenc/dec: Avoid adding temporary structure As a minor optimisation Part-of: --- .../gst-libs/gst/audio/gstaudioutilsprivate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioutilsprivate.c b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioutilsprivate.c index 154d73224c..1f704efad4 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioutilsprivate.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioutilsprivate.c @@ -51,7 +51,6 @@ __gst_audio_element_proxy_caps (GstElement * element, GstCaps * templ_caps, 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, "rate"))) @@ -61,9 +60,8 @@ __gst_audio_element_proxy_caps (GstElement * element, GstCaps * templ_caps, if ((val = gst_structure_get_value (caps_s, "channels-mask"))) gst_structure_set_value (s, "channels-mask", val); - gst_caps_append_structure_full (tmp, s, + result = gst_caps_merge_structure_full (result, s, gst_caps_features_copy (features)); - result = gst_caps_merge (result, tmp); } }