Hi! Attached patch reduces the verbosity of the console output, comments welcome.
Carl Eugen
From f164e22f185d6a3e69d3376246a41a6958dba215 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Mon, 16 Dec 2019 21:02:19 +0100 Subject: [PATCH] lavu/log: Do not print pointer addresses for loglevel < debug. --- libavutil/log.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libavutil/log.c b/libavutil/log.c index e8a0db7716..9f246ff99c 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -260,13 +260,21 @@ static void format_line(void *avcl, int level, const char *fmt, va_list vl, AVClass** parent = *(AVClass ***) (((uint8_t *) avcl) + avc->parent_log_context_offset); if (parent && *parent) { - av_bprintf(part+0, "[%s @ %p] ", - (*parent)->item_name(parent), parent); + if (level >= AV_LOG_DEBUG) { + av_bprintf(part+0, "[%s @ %p] ", + (*parent)->item_name(parent), parent); + } else { + av_bprintf(part+0, "[%s ", (*parent)->item_name(parent)); + } if(type) type[0] = get_category(parent); } } - av_bprintf(part+1, "[%s @ %p] ", - avc->item_name(avcl), avcl); + if (level >= AV_LOG_DEBUG) { + av_bprintf(part+1, "[%s @ %p] ", + avc->item_name(avcl), avcl); + } else { + av_bprintf(part+1, "[%s] ", avc->item_name(avcl)); + } if(type) type[1] = get_category(avcl); } -- 2.23.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".