mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-01 07:37:09 +08:00
Allow to force colored output.
Patch by Etienne Buira, etienne d buira d lists a free d fr Originally committed as revision 25888 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:

committed by
Carl Eugen Hoyos

parent
35b0169484
commit
129983408d
@ -62,9 +62,9 @@ static void colored_fputs(int level, const char *str){
|
||||
background = attr_orig & 0xF0;
|
||||
}
|
||||
#elif HAVE_ISATTY
|
||||
use_color= getenv("TERM") && !getenv("NO_COLOR") && isatty(2);
|
||||
use_color= !getenv("NO_COLOR") && (getenv("TERM") && isatty(2) || getenv("FFMPEG_FORCE_COLOR"));
|
||||
#else
|
||||
use_color= 0;
|
||||
use_color= getenv("FFMPEG_FORCE_COLOR") && !getenv("NO_COLOR");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user