[gst-cvs] gstreamer: gstplugin: load the gst-python plugin loader with G_MODULE_BIND_LAZY.
Sebastian Dröge
sebastian.droege at collabora.co.uk
Thu Aug 26 11:36:50 PDT 2010
On Thu, 2010-08-26 at 21:25 +0300, Stefan Kost wrote:
> Am 26.08.2010 15:36, schrieb Alessandro Decina:
> > Module: gstreamer
> > Branch: master
> > Commit: 94a314eaeed4439d67049f7b60c5a07416f53ef2
> > URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=94a314eaeed4439d67049f7b60c5a07416f53ef2
> >
> > Author: Alessandro Decina <alessandro.decina at collabora.co.uk>
> > Date: Thu Aug 26 13:46:34 2010 +0200
> >
> > gstplugin: load the gst-python plugin loader with G_MODULE_BIND_LAZY.
> >
> > ---
> >
> > gst/gstplugin.c | 12 +++++++++++-
> > 1 files changed, 11 insertions(+), 1 deletions(-)
> >
> > diff --git a/gst/gstplugin.c b/gst/gstplugin.c
> > index 599af83..c16e624 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;
>
> why
> if (g_strstr_len (filename, strlen (filename), "libgstpython"))
> instead of
> if (!strncmp (filename, "libgstpython", strlen("libgstpython"))
filename should be the complete path + filename
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-commits/attachments/20100826/63df5cf8/attachment.pgp>
More information about the Gstreamer-commits
mailing list