From aeeab599629508db5cb8d8dbc929ca5bde08d57e Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Tue, 13 Sep 2005 13:38:54 +0000 Subject: [PATCH] gst/gstregistry.c: duplicate plugin should never be freed as this the original one we are receiving here. Original commit message from CVS: 2005-09-13 Julien MOUTTE * gst/gstregistry.c: (gst_registry_add_plugin): duplicate plugin should never be freed as this the original one we are receiving here. --- ChangeLog | 5 +++++ gst/gstregistry.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cbf48c431b..8dbd5e90ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-13 Julien MOUTTE + + * gst/gstregistry.c: (gst_registry_add_plugin): duplicate plugin + should never be freed as this the original one we are receiving here. + 2005-09-12 Steve Lhomme * gst/elements/gstfilesrc.c: (gst_filesrc_get_read) * gst/elements/gstfilesrc.h: diff --git a/gst/gstregistry.c b/gst/gstregistry.c index e9e91beba5..6c02bf76d5 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -287,7 +287,10 @@ gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin) GST_WARNING_OBJECT (registry, "Not adding plugin %s, " "because a plugin with same name already exists", gst_plugin_get_name (plugin)); - gst_plugin_free (plugin); + /* We don't free the plugin here because when gst_plugin_load_file detects + * and already loaded plugin it just returns the loaded one. So basically + * if we free this plugin we are freeing the original one which is already + * in the registry (dolphy, 09/13/2005) */ return FALSE; }