GNOME Bugzilla – Bug 484225
web: code from tutorial genrates warning on execution
Last modified: 2007-10-08 17:26:29 UTC
reference: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/x291.html # ./a.out (process:6792): GStreamer-WARNING **: The GStreamer function gst_init_get_option_group() was called, but the GLib threading system has not been initialised yet, something that must happen before any other GLib function is called. The application needs to be fixed so that it calls if (!g_thread_supported ()) g_thread_init(NULL); as very first thing in its main() function. Please file a bug against this application. Run me with --help to see the Application options appended. Fix: // must initialise the threading system before using any other GLib funtion if (!g_thread_supported ()) g_thread_init (NULL);
Created attachment 96786 [details] [review] patch to add glib thread init sequence
Thanks for that patch, committed in the right place, ie. the xml file. Also fixed up another example: 2007-10-08 Tim-Philipp Müller <tim at centricular dot net> * docs/manual/appendix-integration.xml: * docs/manual/basics-init.xml: Call g_thread_init() before g_option_context_new() to avoid warnings. Spotted by Ritesh Khadgaray. Fixes #484225.