mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
plugin: plugin_load() must return a ref even if it was loaded already
Fix refcounting issue when plugin was loaded already. gst_plugin_load() is supposed to return a ref, so it must always return a ref. This also fixes the gstplugin unit test on windows where fork is not available and where test_load_coreelements() would unref a plugin ref it didn't get and then mess up the internal registry plugin list state for the next test, in case where the test registry does not exist yet.
This commit is contained in:
parent
4a5aa8dba0
commit
5feff26624
1 changed files with 1 additions and 1 deletions
|
@ -1361,7 +1361,7 @@ gst_plugin_load (GstPlugin * plugin)
|
|||
GstPlugin *newplugin;
|
||||
|
||||
if (gst_plugin_is_loaded (plugin)) {
|
||||
return plugin;
|
||||
return gst_object_ref (plugin);
|
||||
}
|
||||
|
||||
if (!(newplugin = gst_plugin_load_file (plugin->filename, &error)))
|
||||
|
|
Loading…
Reference in a new issue