X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Finit.c;h=b0da4c435947186794551f36dedf71d4697b71aa;hb=b026b1ac697815f2bd67e11a8718478dc1d3aed6;hp=bfc67dd033bb4d994a9d2fc9cb21c29ea89c228f;hpb=b0252a8b56857ed60e69974d02803620bf93ede1;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/init.c b/libchimara/init.c index bfc67dd..b0da4c4 100644 --- a/libchimara/init.c +++ b/libchimara/init.c @@ -1,6 +1,9 @@ #include #include #include +#ifdef GSTREAMER_SOUND +#include +#endif static gboolean chimara_initialized = FALSE; @@ -21,7 +24,15 @@ chimara_init(void) " the thread system by calling g_threads_init() and " "gdk_threads_init() BEFORE the initial call to gtk_init() in " "your main program.")); - + +#ifdef GSTREAMER_SOUND + /* Make sure GStreamer has been initialized if it hasn't been already; + in particular, if you want your program to parse GStreamer command line + options then you should do it yourself, before gtk_init(). */ + if( !gst_is_initialized() ) + gst_init(NULL, NULL); +#endif + /* Initialize thread-private data */ extern GPrivate *glk_data_key; glk_data_key = g_private_new(NULL);