diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2017-12-02 12:29:20 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-12-06 16:39:33 +0200 |
commit | 3ef7a5999b981d43f513d9a884ad52a2417404a3 (patch) | |
tree | 05f8cc83e370b4d749bd266a4ed179c38df83d86 | |
parent | 5682141f0fdba60ebb0477dd25d1e493f66981c0 (diff) |
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.
-rw-r--r-- | gst/gstinfo.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 48c9ca8c03..c13a057400 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; } |