summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorTobias Rapp <t.rapp@noa-archive.com>2018-03-14 09:34:32 +0100
committerTobias Rapp <t.rapp@noa-archive.com>2018-03-16 09:08:17 +0100
commit1296a718dc62728b6601f694539a1c5ad8ad260c (patch)
tree1cc01f06b2218599e5a09ced1163e50d6eb50300 /libavutil
parent7af2336598e99433a273fd0346fd456940f46f96 (diff)
downloadffmpeg-1296a718dc62728b6601f694539a1c5ad8ad260c.tar.gz
avutil/log: print level prefix also when no AVClass context is available
Adds the level prefix to all log messages, except those with level <= AV_LOG_QUIET as they seem to be used for flushing the log buffer. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index bd47f2a25f..9b7d48487f 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -266,11 +266,11 @@ static void format_line(void *avcl, int level, const char *fmt, va_list vl,
av_bprintf(part+1, "[%s @ %p] ",
avc->item_name(avcl), avcl);
if(type) type[1] = get_category(avcl);
-
- if (flags & AV_LOG_PRINT_LEVEL)
- av_bprintf(part+2, "[%s] ", get_level_str(level));
}
+ if (*print_prefix && (level > AV_LOG_QUIET) && (flags & AV_LOG_PRINT_LEVEL))
+ av_bprintf(part+2, "[%s] ", get_level_str(level));
+
av_vbprintf(part+3, fmt, vl);
if(*part[0].str || *part[1].str || *part[2].str || *part[3].str) {