clockselect: Don't register GstClockSelectClockId multiple times

This commit is contained in:
Sebastian Dröge 2020-06-02 12:51:35 +03:00 committed by Thibault Saunier
parent 74f2f733be
commit a5b1e1e96d

View File

@ -49,6 +49,9 @@ static GType
gst_clock_select_clock_id_get_type (void)
{
static GType clock_id_type = 0;
if (g_once_init_enter (&clock_id_type)) {
GType type;
static const GEnumValue clock_id_types[] = {
{GST_CLOCK_SELECT_CLOCK_ID_DEFAULT,
"Default (elected from elements) pipeline clock", "default"},
@ -60,8 +63,9 @@ gst_clock_select_clock_id_get_type (void)
{0, NULL, NULL},
};
clock_id_type =
g_enum_register_static ("GstClockSelectClockId", clock_id_types);
type = g_enum_register_static ("GstClockSelectClockId", clock_id_types);
g_once_init_leave (&clock_id_type, type);
}
return clock_id_type;
}