diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-12-04 17:35:02 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-12-04 17:35:02 -0500 |
commit | e0317288ba75ec5ff41f12a834c76d74ca390e2c (patch) | |
tree | 85dc7f9c4fd3f578c16aa246fd8fa7807b21f1c1 | |
parent | 249a775d2b6486d3888071d9c9370149a0c831d4 (diff) |
info: Protect __categories list in get_category with lock too
-rw-r--r-- | gst/gstinfo.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 838091c3c..ab454b524 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -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) { |