mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +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;
|
||||
|
||||
if (G_UNLIKELY (type == 0)) {
|
||||
type = g_type_register_static_simple (GST_TYPE_PAD,
|
||||
if (g_once_init_enter (&type)) {
|
||||
GType tmp = g_type_register_static_simple (GST_TYPE_PAD,
|
||||
g_intern_static_string ("GstMatroskamuxPad"), sizeof (GstPadClass),
|
||||
(GClassInitFunc) gst_matroskamux_pad_class_init,
|
||||
sizeof (GstMatroskamuxPad), NULL, 0);
|
||||
g_once_init_leave (&type, tmp);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue