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
By default the program logs to stderr, if coloring is supported by the
terminal, colors are used to mark errors and warnings. Log coloring
-can be disabled setting the environment variable @env{NO_COLOR}.
+can be disabled setting the environment variable @env{NO_COLOR}, or can
+be forced setting the environment variable @env{FFMPEG_FORCE_COLOR}.
@end table
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
}