From a9713ad5dac888a3c2a394d24e1b8fcc537a0b55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Loeuillet?= Date: Sun, 9 Jan 2005 13:37:33 +0000 Subject: [PATCH] gst/gstplugin.c: Fix plugin loading if plugin/lib was already loaded. Fixes #163383 Original commit message from CVS: * gst/gstplugin.c: (gst_plugin_load): Fix plugin loading if plugin/lib was already loaded. Fixes #163383 --- ChangeLog | 6 ++++++ gst/gstplugin.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea20bd3..31e011b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-09 Stephane LOEUILLET + + * gst/gstplugin.c: (gst_plugin_load): + Fix plugin loading if plugin/lib was already loaded. Fixes + #163383 + 2005-01-09 Sebastien Cote Reviewed by: Ronald S. Bultje diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 34c5143..231d7dd 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -872,8 +872,8 @@ gst_plugin_load (const gchar * name) plugin = gst_registry_pool_find_plugin (name); if (plugin) { - gst_plugin_load_file (plugin->filename, &error); - if (error) { + plugin = gst_plugin_load_file (plugin->filename, &error); + if (!plugin) { GST_WARNING ("load_plugin error: %s\n", error->message); g_error_free (error); return FALSE; @@ -892,7 +892,7 @@ gst_plugin_load (const gchar * name) * Load the named library. Name should be given as * "liblibrary.so". (exception to this rule is 'riff', which .so name is 'gstriff') * - * Returns: whether the library was loaded or not (and return FALSE if it was already loaded) + * Returns: whether the library was loaded or not (and returns TRUE if it was already loaded) */ gboolean gst_library_load (const gchar * name) -- 2.7.4