mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
ges: Make sure not to initialize twice
This commit is contained in:
parent
7ecf33130a
commit
38bcd59bfa
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,8 @@
|
|||
|
||||
GST_DEBUG_CATEGORY (_ges_debug);
|
||||
|
||||
static gboolean ges_initialized = FALSE;
|
||||
|
||||
/**
|
||||
* SECTION:ges-common
|
||||
* @short_description: Initialization.
|
||||
|
@ -62,6 +64,11 @@ ges_init (void)
|
|||
GST_DEBUG_CATEGORY_INIT (_ges_debug, "ges", GST_DEBUG_FG_YELLOW,
|
||||
"GStreamer Editing Services");
|
||||
|
||||
if (ges_initialized) {
|
||||
GST_DEBUG ("already initialized ges");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* register timeline object classes with the system */
|
||||
|
||||
GES_TYPE_TIMELINE_TEST_SOURCE;
|
||||
|
@ -86,6 +93,7 @@ ges_init (void)
|
|||
return FALSE;
|
||||
|
||||
/* TODO: user-defined types? */
|
||||
ges_initialized = TRUE;
|
||||
|
||||
GST_DEBUG ("GStreamer Editing Services initialized");
|
||||
|
||||
|
|
Loading…
Reference in a new issue