]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/log.c
Remove a few if (p) av_freep(&p) forms
[ffmpeg] / libavutil / log.c
index 1975bab396af9b43f807b67293f1964ab36805c3..6c9e76aa24bf9f63d3e42cc1ad7d4889f22e03c1 100644 (file)
@@ -55,16 +55,17 @@ static void colored_fputs(int level, const char *str){
 #if defined(_WIN32) && !defined(__MINGW32CE__)
         CONSOLE_SCREEN_BUFFER_INFO con_info;
         con = GetStdHandle(STD_ERROR_HANDLE);
-        use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR");
+        use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR");
         if (use_color) {
             GetConsoleScreenBufferInfo(con, &con_info);
             attr_orig  = con_info.wAttributes;
             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
     }