playbackutils: Fix caps leak in get_n_common_capsfeatures()

The gst_static_caps_get() return value is transfer-full.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7908>
This commit is contained in:
Philippe Normand 2024-11-16 18:24:23 +00:00
parent 000a7650fc
commit 827caa662c

View file

@ -86,6 +86,7 @@ gst_playback_utils_get_n_common_capsfeatures (GstElementFactory * fact1,
gst_caps_unref (fact1_tmpl_caps);
else if (fact2_tmpl_caps)
gst_caps_unref (fact2_tmpl_caps);
gst_clear_caps (&raw_caps);
return 0;
}
@ -132,6 +133,7 @@ gst_playback_utils_get_n_common_capsfeatures (GstElementFactory * fact1,
gst_caps_unref (fact1_tmpl_caps);
gst_caps_unref (fact2_tmpl_caps);
gst_clear_caps (&raw_caps);
return n_common_cf;
}