plugins: Do not ever unload a plugin after calling into it
authorBenjamin Otte <otte@redhat.com>
Fri, 12 Mar 2010 15:42:47 +0000 (16:42 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 12 Mar 2010 15:56:56 +0000 (16:56 +0100)
commit8fe63000de31bb2bcf346d59230dea06117997cd
tree269bd7ef1f2c0084418b5377028b6f36fab0bcb7
parent1d316d75bb3de509366df844a758cdcfff44a797
plugins: Do not ever unload a plugin after calling into it

This is what can happen in a plugin_init function:
- An element based on GstBaseSink is registered
- Other elements fail to register
- The plugin_init function returns FALSE

Now if this the plugin is the first plugin to link against
libgstbase.so, it will have caused libgstbase.so to be loaded and static
strings from that library will have been added to gobject while
registering GstBaseSink.

So unloading the plugin will cause those strings to go stale and the
next plugin using GstBaseSink will crash. So we must not unload modules
after calling into them ever.

https://bugzilla.redhat.com/show_bug.cgi?id=572800
gst/gstplugin.c