mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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
This commit is contained in:
parent
53e8e7da75
commit
2d92f5e6d8
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue