Commit 780a884e authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

gst/gst.c: init_pre() and init_post() might be called via our GOptionGroup or...

gst/gst.c: init_pre() and init_post() might be called via our GOptionGroup or from gst_init(), and we should skip bot...

Original commit message from CVS:
* gst/gst.c: (init_pre), (init_post):
init_pre() and init_post() might be called via our GOptionGroup or
from gst_init(), and we should skip both of them if we've already
been initialised, otherwise we will init some things twice or add
two default log functions.
parent 5a5bda55
2006-12-14 Tim-Philipp Müller <tim at centricular dot net>
* gst/gst.c: (init_pre), (init_post):
init_pre() and init_post() might be called via our GOptionGroup or
from gst_init(), and we should skip both of them if we've already
been initialised, otherwise we will init some things twice or add
two default log functions.
2006-12-13 Edward Hervey <edward@fluendo.com>
* docs/manual/basics-bus.xml:
......
......@@ -502,6 +502,11 @@ static gboolean
init_pre (GOptionContext * context, GOptionGroup * group, gpointer data,
GError ** error)
{
if (gst_initialized) {
GST_DEBUG ("already initialized");
return TRUE;
}
/* GStreamer was built against a GLib >= 2.8 and is therefore not doing
* the refcount hack. Check that it isn't being run against an older GLib */
if (glib_major_version < 2 ||
......@@ -875,6 +880,11 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
GstTrace *gst_trace;
#endif /* GST_DISABLE_TRACE */
if (gst_initialized) {
GST_DEBUG ("already initialized");
return TRUE;
}
llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL;
g_log_set_handler (g_log_domain_gstreamer, llf, debug_log_handler, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment