Commit 4fcd6211 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

audioconvert: Use new gst_caps_is_subset_structure() API

This prevents one copy of every structure and creating a new caps
instance.
parent 125f6a2f
...@@ -579,17 +579,12 @@ gst_audio_convert_transform_caps (GstBaseTransform * base, ...@@ -579,17 +579,12 @@ gst_audio_convert_transform_caps (GstBaseTransform * base,
structure = gst_caps_get_structure (caps, j); structure = gst_caps_get_structure (caps, j);
if (j > 0) { if (j > 0) {
GstCaps *tmp = gst_caps_new_full (gst_structure_copy (structure), NULL);
/* If the new structure is a subset of the already existing transformed /* If the new structure is a subset of the already existing transformed
* caps we can safely skip it because we would transform it to the * caps we can safely skip it because we would transform it to the
* same caps again. * same caps again.
*/ */
if (gst_caps_is_subset (tmp, ret)) { if (gst_caps_is_subset_structure (ret, structure))
gst_caps_unref (tmp);
continue; continue;
}
gst_caps_unref (tmp);
} }
structure_name = gst_structure_get_name (structure); structure_name = gst_structure_get_name (structure);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment