mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
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:
parent
6b84737d18
commit
38f5745fa8
2 changed files with 21 additions and 1 deletions
|
@ -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>
|
||||
|
||||
* docs/design/part-qos.txt:
|
||||
|
|
14
gst/gst.c
14
gst/gst.c
|
@ -371,8 +371,9 @@ gst_init_check (int *argc, char **argv[], GError ** err)
|
|||
res = g_option_context_parse (ctx, argc, argv, err);
|
||||
g_option_context_free (ctx);
|
||||
|
||||
gst_initialized = res;
|
||||
|
||||
if (res) {
|
||||
gst_initialized = TRUE;
|
||||
GST_INFO ("initialized GStreamer successfully");
|
||||
} else {
|
||||
GST_INFO ("failed to initialize GStreamer");
|
||||
|
@ -825,6 +826,17 @@ init_post (void)
|
|||
|
||||
_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
|
||||
if (!ensure_current_registry ())
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue