diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-12-06 21:47:10 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-12-06 21:47:10 +0000 |
commit | 3011ecdeb72af7e07f75e701061fb18f0745fd10 (patch) | |
tree | be247c2f842aa426112c8fc2f6f92fcebee775df /libavutil/log.c | |
parent | efd63823e640b67d3c575e37a291eddf5f6268d2 (diff) | |
download | ffmpeg-3011ecdeb72af7e07f75e701061fb18f0745fd10.tar.gz |
Introduce FFMPEG_FORCE_NOCOLOR, with the same meaning and use of
NO_COLOR (but properly prefixed for avoiding namespace conflicts).
Originally committed as revision 25899 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/log.c')
-rw-r--r-- | libavutil/log.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index 1975bab396..0388e0a816 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -62,9 +62,10 @@ static void colored_fputs(int level, const char *str){ background = attr_orig & 0xF0; } #elif HAVE_ISATTY - use_color= !getenv("NO_COLOR") && (getenv("TERM") && isatty(2) || getenv("FFMPEG_FORCE_COLOR")); + use_color= !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR") && + (getenv("TERM") && isatty(2) || getenv("FFMPEG_FORCE_COLOR")); #else - use_color= getenv("FFMPEG_FORCE_COLOR") && !getenv("NO_COLOR"); + use_color= getenv("FFMPEG_FORCE_COLOR") && !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR"); #endif } |