summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-03-12 13:14:52 +0000
committerTim-Philipp Müller <tim@centricular.com>2015-03-12 13:16:22 +0000
commit2d92f5e6d87b5ce92794137e2b389f6cedd7cdae (patch)
tree6cf0b26f27eba97abb2c12ab40e7ce30047c9940
parent53e8e7da75e4eeaa1054eb24e50568b32d8bd6b1 (diff)
info: move category level threshold check into log function dispatcher
Minor optimisation: check category log level earlier in the log function dispatcher and not only in the default log function. https://bugzilla.gnome.org/show_bug.cgi?id=745213
-rw-r--r--gst/gstinfo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index 135e0e719..f40a28102 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -491,6 +491,10 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
GSList *handler;
g_return_if_fail (category != NULL);
+
+ if (level > gst_debug_category_get_threshold (category))
+ return;
+
g_return_if_fail (file != NULL);
g_return_if_fail (function != NULL);
g_return_if_fail (format != NULL);
@@ -988,9 +992,6 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
FILE *log_file = user_data ? user_data : stderr;
gchar c;
- if (level > gst_debug_category_get_threshold (category))
- return;
-
/* __FILE__ might be a file name or an absolute path or a
* relative path, irrespective of the exact compiler used,
* in which case we want to shorten it to the filename for