GNOME Bugzilla – Bug 380129
gst_plugin_feature_load doesn't consistently ref a returned object
Last modified: 2006-12-07 12:17:42 UTC
At the moment, gst_plugin_feature_load only refs the returned object the first time it is loaded, not if it is already loaded, despite what the documentation says. Fortunately, this is compensated at the moment by the fact that noone unrefs the returned object. *Un*fortunately, at the end of the day this means we leak plugin features when closing down, which makes me sad. Attaching a patch which makes gst_plugin_feature_load do what it is supposed to, and fixes refcounting in the places it's used in the core.
Created attachment 77292 [details] [review] fix refcounting
Leaving this until after the releases, because it's not a regression.
* gst/gstelementfactory.c: (gst_element_factory_create): * gst/gstpluginfeature.c: (gst_plugin_feature_load): * gst/gsttypefindfactory.c: (gst_type_find_factory_call_function): * tools/gst-inspect.c: (print_element_info): Fix refcounting of gst_plugin_feature_load to match the docs. Fixes: #380129