mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
gstbasertppayload: Use g_once_init_{enter,leave}() in the _get_type() function
This commit is contained in:
parent
5d4fd722f0
commit
a7e8c8debe
1 changed files with 3 additions and 3 deletions
|
@ -121,7 +121,7 @@ gst_basertppayload_get_type (void)
|
||||||
{
|
{
|
||||||
static GType basertppayload_type = 0;
|
static GType basertppayload_type = 0;
|
||||||
|
|
||||||
if (!basertppayload_type) {
|
if (g_once_init_enter ((gsize *) & basertppayload_type)) {
|
||||||
static const GTypeInfo basertppayload_info = {
|
static const GTypeInfo basertppayload_info = {
|
||||||
sizeof (GstBaseRTPPayloadClass),
|
sizeof (GstBaseRTPPayloadClass),
|
||||||
(GBaseInitFunc) gst_basertppayload_base_init,
|
(GBaseInitFunc) gst_basertppayload_base_init,
|
||||||
|
@ -134,9 +134,9 @@ gst_basertppayload_get_type (void)
|
||||||
(GInstanceInitFunc) gst_basertppayload_init,
|
(GInstanceInitFunc) gst_basertppayload_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
basertppayload_type =
|
g_once_init_leave ((gsize *) & basertppayload_type,
|
||||||
g_type_register_static (GST_TYPE_ELEMENT, "GstBaseRTPPayload",
|
g_type_register_static (GST_TYPE_ELEMENT, "GstBaseRTPPayload",
|
||||||
&basertppayload_info, G_TYPE_FLAG_ABSTRACT);
|
&basertppayload_info, G_TYPE_FLAG_ABSTRACT));
|
||||||
}
|
}
|
||||||
return basertppayload_type;
|
return basertppayload_type;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue