summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.decina@collabora.co.uk>2010-08-26 13:46:34 +0200
committerAlessandro Decina <alessandro.decina@collabora.co.uk>2010-08-26 14:32:40 +0200
commit94a314eaeed4439d67049f7b60c5a07416f53ef2 (patch)
tree9ecf240fefe8c310780c63c93d2874b1f16cb9ab
parent0bd40a439789fdfb92bb945ccdb0b9b2b34611eb (diff)
gstplugin: load the gst-python plugin loader with G_MODULE_BIND_LAZY.
-rw-r--r--gst/gstplugin.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gst/gstplugin.c b/gst/gstplugin.c
index 599af83fc7..c16e6244dd 100644
--- a/gst/gstplugin.c
+++ b/gst/gstplugin.c
@@ -711,6 +711,7 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
GStatBuf file_status;
GstRegistry *registry;
gboolean new_plugin = TRUE;
+ GModuleFlags flags;
g_return_val_if_fail (filename != NULL, NULL);
@@ -749,7 +750,16 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
goto return_error;
}
- module = g_module_open (filename, G_MODULE_BIND_LOCAL);
+ flags = G_MODULE_BIND_LOCAL;
+ /* libgstpython.so is the gst-python plugin loader. It needs to be loaded with
+ * G_MODULE_BIND_LAZY.
+ *
+ * Ideally there should be a generic way for plugins to specify that they
+ * need to be loaded with _LAZY.
+ * */
+ if (g_strstr_len (filename, strlen (filename), "libgstpython"))
+ flags |= G_MODULE_BIND_LAZY;
+ module = g_module_open (filename, flags);
if (module == NULL) {
GST_CAT_WARNING (GST_CAT_PLUGIN_LOADING, "module_open failed: %s",
g_module_error ());