summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorEtienne Buira <etienne.buira.lists@free.fr>2010-12-05 13:56:49 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-12-05 13:56:49 +0000
commit129983408d0d064db656742a3d3d4c038420f48c (patch)
tree3ef93779cf2011453545018ac8350c8d182d148c /libavutil/log.c
parent35b016948476cf5cfa097052816cb6907f03362e (diff)
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
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 0fd7c96baa..1975bab396 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -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
}