GNOME Bugzilla – Bug 399807
[PATCH] call g_thread_init() before any other GLib function
Last modified: 2007-01-23 20:19:07 UTC
Please describe the problem: Attached patch fixes a few more programs in gnome-media to call g_thread_init() right at the beginning before any other GLib function, as apparently is required (and to avoid warnings from GStreamer to this effect). Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 80988 [details] [review] adds g_thread_init() calls to gstreamer-properties, gnome-cd and gnome-recorder
Why g_thread_supported()? It's the first function you call, so nothing else can have called it. You can probably just call _init() directly. As for the rest, go ahead and apply, I sort of expected all tools to need this. :-).
> Why g_thread_supported()? It's the first function you call, so nothing else can > have called it. You can probably just call _init() directly. Just to guard against the (probably somewhat theoretical) possibility that some library used already initialised the GLib threading system in a constructor function that's called before main(). Can do without, whichever you prefer.
We don't do that. If we do, it's a bug. I'd prefer without.
Thanks, committed: 2007-01-23 Tim-Philipp Müller <tim at centricular dot net> * gnome-cd/gnome-cd.c: (main): * grecord/src/gnome-recorder.c: (main): * gstreamer-properties/gstreamer-properties.c: (main): Call g_thread_init() before calling any other GLib function here too. Closes #399807.