diff --git a/gst/smpte/barboxwipes.c b/gst/smpte/barboxwipes.c index 7855eaabbc..4f4e62e42a 100644 --- a/gst/smpte/barboxwipes.c +++ b/gst/smpte/barboxwipes.c @@ -948,10 +948,16 @@ static const GstMaskDefinition definitions[] = { void _gst_barboxwipes_register (void) { - gint i = 0; + static gsize id = 0; - while (definitions[i].short_name) { - _gst_mask_register (&definitions[i]); - i++; + if (g_once_init_enter (&id)) { + gint i = 0; + + while (definitions[i].short_name) { + _gst_mask_register (&definitions[i]); + i++; + } + + g_once_init_leave (&id, 1); } }