gst-full: Prevent multiple calls to gst_init_static_plugins()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/191>
This commit is contained in:
Xavier Claessens 2020-10-01 10:43:36 -04:00
parent d4f95054e1
commit 89913b2f83

View file

@ -12,7 +12,11 @@ $plugins_declaration
void void
gst_init_static_plugins (void) gst_init_static_plugins (void)
{ {
static gsize initialization_value = 0;
if (g_once_init_enter (&initialization_value)) {
$plugins_registration $plugins_registration
g_once_init_leave (&initialization_value, 1);
}
} }
''') ''')