Commit d6838309 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/log: skip setting color for default (AV_LOG_INFO) level

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2c21e2ee
...@@ -127,19 +127,19 @@ static void colored_fputs(int level, const char *str) ...@@ -127,19 +127,19 @@ static void colored_fputs(int level, const char *str)
} }
#if HAVE_SETCONSOLETEXTATTRIBUTE #if HAVE_SETCONSOLETEXTATTRIBUTE
if (use_color) if (use_color && level != AV_LOG_INFO/8)
SetConsoleTextAttribute(con, background | color[level]); SetConsoleTextAttribute(con, background | color[level]);
fputs(str, stderr); fputs(str, stderr);
if (use_color) if (use_color && level != AV_LOG_INFO/8)
SetConsoleTextAttribute(con, attr_orig); SetConsoleTextAttribute(con, attr_orig);
#else #else
if (use_color == 1) { if (use_color == 1 && level != AV_LOG_INFO/8) {
fprintf(stderr, fprintf(stderr,
"\033[%d;3%dm%s\033[0m", "\033[%d;3%dm%s\033[0m",
(color[level] >> 4) & 15, (color[level] >> 4) & 15,
color[level] & 15, color[level] & 15,
str); str);
} else if (use_color == 256) { } else if (use_color == 256 && level != AV_LOG_INFO/8) {
fprintf(stderr, fprintf(stderr,
"\033[48;5;%dm\033[38;5;%dm%s\033[0m", "\033[48;5;%dm\033[38;5;%dm%s\033[0m",
(color[level] >> 16) & 0xff, (color[level] >> 16) & 0xff,
......
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