Commit c88a143c authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

baseparse: fix up GType name and make _get_type() function thread-safe

Rename GType from GstBaseParseBad to GstBaseParse.
parent 20f29628
...@@ -313,9 +313,9 @@ static void gst_base_parse_init (GstBaseParse * parse, ...@@ -313,9 +313,9 @@ static void gst_base_parse_init (GstBaseParse * parse,
GType GType
gst_base_parse_get_type (void) gst_base_parse_get_type (void)
{ {
static GType base_parse_type = 0; static volatile gsize base_parse_type = 0;
if (!base_parse_type) { if (g_once_init_enter (&base_parse_type)) {
static const GTypeInfo base_parse_info = { static const GTypeInfo base_parse_info = {
sizeof (GstBaseParseClass), sizeof (GstBaseParseClass),
(GBaseInitFunc) NULL, (GBaseInitFunc) NULL,
...@@ -327,11 +327,13 @@ gst_base_parse_get_type (void) ...@@ -327,11 +327,13 @@ gst_base_parse_get_type (void)
0, 0,
(GInstanceInitFunc) gst_base_parse_init, (GInstanceInitFunc) gst_base_parse_init,
}; };
GType _type;
base_parse_type = g_type_register_static (GST_TYPE_ELEMENT, _type = g_type_register_static (GST_TYPE_ELEMENT,
"GstBaseParseBad", &base_parse_info, G_TYPE_FLAG_ABSTRACT); "GstBaseParse", &base_parse_info, G_TYPE_FLAG_ABSTRACT);
g_once_init_leave (&base_parse_type, _type);
} }
return base_parse_type; return (GType) base_parse_type;
} }
static void gst_base_parse_finalize (GObject * object); static void gst_base_parse_finalize (GObject * object);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment