Commit 1296a718 authored by Tobias Rapp's avatar Tobias Rapp

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarTobias Rapp <t.rapp@noa-archive.com>
parent 7af23365
......@@ -266,10 +266,10 @@ 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)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment