mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-17 12:30:11 +01:00
log: Unbreak no-tty support on 256color terminals
This commit is contained in:
committed by
John Stebbins
parent
4039f11ed8
commit
891de4b27a
@@ -75,6 +75,7 @@ static void check_color_terminal(void)
|
|||||||
char *term = getenv("TERM");
|
char *term = getenv("TERM");
|
||||||
use_color = !getenv("NO_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR") &&
|
use_color = !getenv("NO_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR") &&
|
||||||
(getenv("TERM") && isatty(2) || getenv("AV_LOG_FORCE_COLOR"));
|
(getenv("TERM") && isatty(2) || getenv("AV_LOG_FORCE_COLOR"));
|
||||||
|
if (use_color)
|
||||||
use_color += term && strstr(term, "256color");
|
use_color += term && strstr(term, "256color");
|
||||||
#else
|
#else
|
||||||
use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("NO_COLOR") &&
|
use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("NO_COLOR") &&
|
||||||
|
|||||||
Reference in New Issue
Block a user