diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2008-03-28 18:33:24 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2008-03-28 18:33:24 +0000 |
commit | 9a5d4f84152e5d01f5a2cd9af8399ec8d0b0f996 (patch) | |
tree | e6b1af247d94348ea6eacf67c21e194048ba4aec | |
parent | f7cf8131f5890f78df95a94aed4d8f0cc728f72a (diff) |
src/main.c: Call g_thread_init() before calling any other GLib function, such as g_option_context_new().
Original commit message from CVS:
* src/main.c: (main):
Call g_thread_init() before calling any other GLib function,
such as g_option_context_new().
m--------- | common | 0 | ||||
-rw-r--r-- | gst-app/ChangeLog | 6 | ||||
-rw-r--r-- | gst-app/src/main.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/common b/common -Subproject b3fe2a25c1cd0f4b021795d0db7330aeb338da7 +Subproject 4221e9dcb05faa6f6f7ba19bba32fe90da4577d diff --git a/gst-app/ChangeLog b/gst-app/ChangeLog index d2a5245..0fdf45a 100644 --- a/gst-app/ChangeLog +++ b/gst-app/ChangeLog @@ -1,3 +1,9 @@ +2008-03-28 Tim-Philipp Müller <tim at centricular dot net> + + * src/main.c: (main): + Call g_thread_init() before calling any other GLib function, + such as g_option_context_new(). + 2006-07-04 Tim-Philipp Müller <tim at centricular dot net> * autogen.sh: diff --git a/gst-app/src/main.c b/gst-app/src/main.c index 8970400..5ad0df0 100644 --- a/gst-app/src/main.c +++ b/gst-app/src/main.c @@ -105,6 +105,11 @@ main (int argc, char *argv[]) GError *err = NULL; gint i, num; + /* Before calling any GLib or GStreamer function, we must initialise + * the GLib threading system */ + if (!g_thread_supported()) + g_thread_init (NULL); + ctx = g_option_context_new ("[FILE1] [FILE2] ..."); g_option_context_add_group (ctx, gst_init_get_option_group ()); g_option_context_add_main_entries (ctx, entries, NULL); |