gst/gst.c: Call g_thread_init() first thing in gst_init() / gst_check_init().
authorTim-Philipp Müller <tim@centricular.net>
Fri, 5 Jan 2007 16:36:36 +0000 (16:36 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 5 Jan 2007 16:36:36 +0000 (16:36 +0000)
commit3001f88c3c99af905f853493dce975907778781a
treeb3ee6b1a0ffc4d20aa9c4a00b97295f11e90a1ed
parentb3eafe67a8dec51a7fbf9e2ddb0dad31d12c54bf
gst/gst.c: Call g_thread_init() first thing in gst_init() / gst_check_init().

Original commit message from CVS:
* gst/gst.c: (gst_init_get_option_group), (gst_init_check),
(init_pre):
Call g_thread_init() first thing in gst_init() / gst_check_init().
When initialisation is done via gst_init_get_option_group() and
GOption parsing, issue a warning if the GLib thread system has not
been initialised yet by the time gst_init_get_option_group() is
called, as it's quite likely other GLib functions such as
g_option_context_new() have been called already then, and
g_thread_init() must be called before any other GLib function. The
application in question must be fixed in that case, since memory
corruption might happen otherwise.
We issue the warning because even if the GLib folks decide to work
around the problem on their end in future, this is still an issue
with all GLib versions >= 2.10.0, so we should warn until we depend
on a GLib version we know to be safe.
Update documentation as well.
Closes bug #391278.
ChangeLog
gst/gst.c