gst/gstplugin.c: Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC again...
authorTim-Philipp Müller <tim@centricular.net>
Sun, 20 Jan 2008 15:04:33 +0000 (15:04 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 20 Jan 2008 15:04:33 +0000 (15:04 +0000)
commit22cf61b56ebdba124eb9af936d6802a62eebb1f5
tree6f82b358abc29be982f12def0f7014d434a77ab8
parentf1850d1fee5415f69b5cc24b6896c108fd626163
gst/gstplugin.c: Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC again, which I broke two commits ago when ...

Original commit message from CVS:
* gst/gstplugin.c: (_gst_plugin_initialize):
Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC
again, which I broke two commits ago when changing the API
of gst_plugin_register_static(): the g_list_foreach() in
_gst_plugin_register_static still assumed the old function
signature and would therefore fail (re-fixes #510187).
* gst/gstplugin.c: (_num_static_plugins), (_static_plugins),
(_gst_plugin_register_static), (gst_plugin_register_static):
Revert the (technically correct) change to call g_thread_init() from
the pre-main() constructor. This will break programs which call
g_thread_init() without an if (!g_thread_supported()) guard in their
main function. We could just blame it on GLib or the application, but
it's probably best to just avoid this altogether and simply not use
any GLib functions here and use plain old malloc() with a simple
array to store the plugins to register later when gst_init() is
finally called (re-fixes #510187).
* tests/check/gst/gstplugin.c: (GST_GNUC_CONSTRUCTOR_DEFINED),
(GST_GNUC_CONSTRUCTOR_DEFINED), (plugin_init_counter),
(plugin1_init), (plugin2_init), (plugin3_init), (GST_START_TEST),
(GST_START_TEST), (gst_plugin_suite):
Dumb unit test to make sure the old GST_PLUGIN_DEFINE_STATIC still
works.
ChangeLog
common
gst/gstplugin.c
tests/check/gst/gstplugin.c