mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
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>
This commit is contained in:
parent
7af2336598
commit
1296a718dc
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user