[FFmpeg-cvslog] r25899 - in trunk: doc/fftools-common-opts.texi libavutil/log.c

stefano subversion
Mon Dec 6 22:47:11 CET 2010


Author: stefano
Date: Mon Dec  6 22:47:10 2010
New Revision: 25899

Log:
Introduce FFMPEG_FORCE_NOCOLOR, with the same meaning and use of
NO_COLOR (but properly prefixed for avoiding namespace conflicts).

Modified:
   trunk/doc/fftools-common-opts.texi
   trunk/libavutil/log.c

Modified: trunk/doc/fftools-common-opts.texi
==============================================================================
--- trunk/doc/fftools-common-opts.texi	Mon Dec  6 16:18:50 2010	(r25898)
+++ trunk/doc/fftools-common-opts.texi	Mon Dec  6 22:47:10 2010	(r25899)
@@ -84,7 +84,8 @@ Set the logging level used by the librar
 
 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

Modified: trunk/libavutil/log.c
==============================================================================
--- trunk/libavutil/log.c	Mon Dec  6 16:18:50 2010	(r25898)
+++ trunk/libavutil/log.c	Mon Dec  6 22:47:10 2010	(r25899)
@@ -62,9 +62,10 @@ static void colored_fputs(int level, con
             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
     }
 



More information about the ffmpeg-cvslog mailing list