[FFmpeg-devel] [PATCH] Add Win32 check for FFMPEG_FORCE_NOCOLOR

Ramiro Polla ramiro.polla
Sat Jan 1 00:39:17 CET 2011


Hi Daniel,

On Fri, Dec 31, 2010 at 8:35 PM, Daniel Verkamp <daniel at drv.nu> wrote:
> Currently the Win32 path of libavutil/log.c only checks the NO_COLOR
> environment variable; a check for the recently-added
> FFMPEG_FORCE_NOCOLOR is missing.
>
> This fixes issue 2461.

Thanks for looking at this.

I think we can use the same logic as for tty, something like this:
use_color = !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR") &&
(con != INVALID_HANDLE_VALUE || getenv("FFMPEG_FORCE_COLOR"));

(it might even be possible to merge all three use_color ifdefs using this line)



More information about the ffmpeg-devel mailing list