mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
matroskamux: make GstMatroskamuxPad get_type() function thread-safe
https://bugzilla.gnome.org/show_bug.cgi?id=739722
This commit is contained in:
parent
36532f5070
commit
ec05d3b6d8
1 changed files with 3 additions and 2 deletions
|
@ -365,11 +365,12 @@ gst_matroskamux_pad_get_type (void)
|
||||||
{
|
{
|
||||||
static GType type = 0;
|
static GType type = 0;
|
||||||
|
|
||||||
if (G_UNLIKELY (type == 0)) {
|
if (g_once_init_enter (&type)) {
|
||||||
type = g_type_register_static_simple (GST_TYPE_PAD,
|
GType tmp = g_type_register_static_simple (GST_TYPE_PAD,
|
||||||
g_intern_static_string ("GstMatroskamuxPad"), sizeof (GstPadClass),
|
g_intern_static_string ("GstMatroskamuxPad"), sizeof (GstPadClass),
|
||||||
(GClassInitFunc) gst_matroskamux_pad_class_init,
|
(GClassInitFunc) gst_matroskamux_pad_class_init,
|
||||||
sizeof (GstMatroskamuxPad), NULL, 0);
|
sizeof (GstMatroskamuxPad), NULL, 0);
|
||||||
|
g_once_init_leave (&type, tmp);
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue