[gstreamer-bugs] [Bug 391278] gst programmes don't call g_thread_init early enough

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Dec 31 08:28:16 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=391278

  GStreamer | don't know | Ver: HEAD CVS





------- Comment #1 from Tim-Philipp Müller  2006-12-31 16:26 UTC -------
If this is true, and I understand it correctly, this would not only seem to be
an ABI break on glib's part [*], but also completely defeat the purpose of
doing library initialisations indirectly via GOption, at least for libraries
that use threads internally.

The problem seems to come from g_option_context_add_group(), which creates
GList nodes, which internally uses GSlice.

So basically all applications initialising GStreamer via GOption have to be
changed to initialise the GLib thread system first (if gst_init() is used
directly, we do the call to g_thread_init() first and can only pray that the
application hasn't used any other GLib/Gtk functions first).


[*] However, the GLib API manual says "g_thread_init() must not be called
directly or indirectly as a callback from GLib.", and I guess that includes
GOption callbacks, so arguably we've been using it incorrectly all along ...


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email




More information about the Gstreamer-bugs mailing list