gst/gst.c: Set gst as being initialized before scanning/updating the registry, since there might be some plugins that...

Original commit message from CVS:
* gst/gst.c: (gst_init_check), (init_post):
Set gst as being initialized before scanning/updating the registry,
since there might be some plugins that call gst_init() and we don't
want to loop back in.
Closes #350879
This commit is contained in:
Edward Hervey 2006-08-11 15:07:58 +00:00
parent 6b84737d18
commit 38f5745fa8
2 changed files with 21 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2006-08-11 Edward Hervey <edward@fluendo.com>
* gst/gst.c: (gst_init_check), (init_post):
Set gst as being initialized before scanning/updating the registry,
since there might be some plugins that call gst_init() and we don't
want to loop back in.
Closes #350879
2006-08-11 Wim Taymans <wim@fluendo.com> 2006-08-11 Wim Taymans <wim@fluendo.com>
* docs/design/part-qos.txt: * docs/design/part-qos.txt:

View file

@ -371,8 +371,9 @@ gst_init_check (int *argc, char **argv[], GError ** err)
res = g_option_context_parse (ctx, argc, argv, err); res = g_option_context_parse (ctx, argc, argv, err);
g_option_context_free (ctx); g_option_context_free (ctx);
gst_initialized = res;
if (res) { if (res) {
gst_initialized = TRUE;
GST_INFO ("initialized GStreamer successfully"); GST_INFO ("initialized GStreamer successfully");
} else { } else {
GST_INFO ("failed to initialize GStreamer"); GST_INFO ("failed to initialize GStreamer");
@ -825,6 +826,17 @@ init_post (void)
_gst_plugin_initialize (); _gst_plugin_initialize ();
/*
* Any errors happening below this point are non-fatal, we therefore mark
* gstreamer as being initialized, since it is the case from a plugin point of
* view.
*
* If anything fails, it will be put back to FALSE in gst_init_check().
* This allows some special plugins that would call gst_init() to not cause a
* looping effect (i.e. initializing GStreamer twice).
*/
gst_initialized = TRUE;
#ifndef GST_DISABLE_REGISTRY #ifndef GST_DISABLE_REGISTRY
if (!ensure_current_registry ()) if (!ensure_current_registry ())
return FALSE; return FALSE;