]> git.sesse.net Git - ffmpeg/commitdiff
avutil/log: drop support for NO_COLOR environment variable
authorMarton Balint <cus@passwd.hu>
Tue, 28 Jan 2020 22:55:18 +0000 (23:55 +0100)
committerMarton Balint <cus@passwd.hu>
Sun, 9 Feb 2020 19:31:44 +0000 (20:31 +0100)
Deprecated for more than 9 years now.

Signed-off-by: Marton Balint <cus@passwd.hu>
doc/fftools-common-opts.texi
libavutil/log.c

index 31cf424823eeef9fa11cff608b68cc8dcbc7a6b3..f339e0d766132ee7b412c7b74cabe34e25e9f74b 100644 (file)
@@ -236,10 +236,8 @@ ffmpeg [...] -loglevel +repeat
 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{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
+@env{AV_LOG_FORCE_NOCOLOR}, or can be forced setting
 the environment variable @env{AV_LOG_FORCE_COLOR}.
-The use of the environment variable @env{NO_COLOR} is deprecated and
-will be dropped in a future FFmpeg version.
 
 @item -report
 Dump full command line and log output to a file named
index 0a7b169bc0b76e3861bc1dc34290ac6d03ac80db..6d87c718a884a83195400d029c4a6c949f96ae93 100644 (file)
@@ -125,8 +125,7 @@ static void check_color_terminal(void)
 #if defined(_WIN32) && HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
     CONSOLE_SCREEN_BUFFER_INFO con_info;
     con = GetStdHandle(STD_ERROR_HANDLE);
-    use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &&
-                !getenv("AV_LOG_FORCE_NOCOLOR");
+    use_color = (con != INVALID_HANDLE_VALUE) && !getenv("AV_LOG_FORCE_NOCOLOR");
     if (use_color) {
         GetConsoleScreenBufferInfo(con, &con_info);
         attr_orig  = con_info.wAttributes;
@@ -134,14 +133,13 @@ static void check_color_terminal(void)
     }
 #elif HAVE_ISATTY
     char *term = getenv("TERM");
-    use_color = !getenv("NO_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR") &&
+    use_color = !getenv("AV_LOG_FORCE_NOCOLOR") &&
                 (getenv("TERM") && isatty(2) || getenv("AV_LOG_FORCE_COLOR"));
     if (   getenv("AV_LOG_FORCE_256COLOR")
         || (term && strstr(term, "256color")))
         use_color *= 256;
 #else
-    use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("NO_COLOR") &&
-               !getenv("AV_LOG_FORCE_NOCOLOR");
+    use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR");
 #endif
 }