mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
info: Protect __categories list in get_category with lock too
This commit is contained in:
parent
249a775d2b
commit
e0317288ba
1 changed files with 14 additions and 2 deletions
|
@ -1674,8 +1674,8 @@ gst_debug_get_all_categories (void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
GstDebugCategory *
|
||||
_gst_debug_get_category (const gchar * name)
|
||||
static GstDebugCategory *
|
||||
_gst_debug_get_category_locked (const gchar * name)
|
||||
{
|
||||
GstDebugCategory *ret = NULL;
|
||||
GSList *node;
|
||||
|
@ -1689,6 +1689,18 @@ _gst_debug_get_category (const gchar * name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
GstDebugCategory *
|
||||
_gst_debug_get_category (const gchar * name)
|
||||
{
|
||||
GstDebugCategory *ret;
|
||||
|
||||
g_mutex_lock (&__cat_mutex);
|
||||
ret = _gst_debug_get_category_locked (name);
|
||||
g_mutex_unlock (&__cat_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_debug_category (gchar * str, const gchar ** category)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue