[SCM] libav/experimental: Introduce FFMPEG_FORCE_NOCOLOR, with the same meaning and use of NO_COLOR (but properly prefixed for avoiding namespace conflicts).
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:19:48 UTC 2013
The following commit has been merged in the experimental branch:
commit 3011ecdeb72af7e07f75e701061fb18f0745fd10
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date: Mon Dec 6 21:47:10 2010 +0000
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
diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 7f192f7..c362a17 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -84,7 +84,8 @@ Set the logging level used by the library.
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}, or can
-be forced setting the environment variable @env{FFMPEG_FORCE_COLOR}.
+can be disabled setting the environment variable
+ at env{FFMPEG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
+the environment variable @env{FFMPEG_FORCE_COLOR}.
@end table
diff --git a/libavutil/log.c b/libavutil/log.c
index 1975bab..0388e0a 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
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list