From 9b944f7fd039144951184e58caaa39cb8bc889a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 2 Dec 2017 12:29:20 +0000 Subject: [PATCH] info: always check match patterns for new debug categories Not only if a match pattern was set originally via GST_DEBUG. Patterns might be set programmatically as well after all. --- gst/gstinfo.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 79b43c1433..8f723c97e9 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -240,8 +240,6 @@ dladdr (void *address, Dl_info * dl) #endif /* __sgi__ */ #endif -static const gchar *_gst_debug_filter = NULL; - static void gst_debug_reset_threshold (gpointer category, gpointer unused); static void gst_debug_reset_all_thresholds (void); @@ -464,10 +462,9 @@ _priv_gst_debug_init (void) if (env) gst_debug_set_color_mode_from_string (env); - _gst_debug_filter = g_getenv ("GST_DEBUG"); - if (_gst_debug_filter) { - gst_debug_set_threshold_from_string (_gst_debug_filter, FALSE); - } + env = g_getenv ("GST_DEBUG"); + if (env) + gst_debug_set_threshold_from_string (env, FALSE); } /* we can't do this further above, because we initialize the GST_CAT_DEFAULT struct */ @@ -1737,9 +1734,7 @@ _gst_debug_category_new (const gchar * name, guint color, g_mutex_unlock (&__cat_mutex); /* ensure the filter is applied to categories registered after _debug_init */ - if (_gst_debug_filter) { - gst_debug_apply_patterns_to_category (cat); - } + gst_debug_apply_patterns_to_category (cat); return cat; } -- 2.34.1