encoding-profile: Plug a leak of factory list
authorThibault Saunier <tsaunier@igalia.com>
Fri, 8 Jan 2021 11:39:32 +0000 (08:39 -0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 10 Feb 2021 15:56:26 +0000 (15:56 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>

gst-libs/gst/pbutils/encoding-profile.c

index 65d6277..6502a63 100644 (file)
@@ -1758,6 +1758,9 @@ create_encoding_profile_from_caps (GstCaps * caps, gchar * preset_name,
         GST_ENCODING_PROFILE (gst_encoding_container_profile_new
         ("User profile", "User profile", caps, NULL));
 
+  if (factories)
+    gst_plugin_feature_list_free (factories);
+
 done:
   if (factory_name && profile)
     gst_encoding_profile_set_preset_name (profile, factory_name);