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

Daniel Verkamp daniel
Sat Jan 1 01:26:51 CET 2011

On Fri, Dec 31, 2010 at 4:39 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> 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
>> 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") &&
> (it might even be possible to merge all three use_color ifdefs using this line)

I don't think it makes sense to allow forcing color for Win32, since
the console handle used for SetConsoleTextAttribute() will be invalid
in that case and nothing good can come of that.

More information about the ffmpeg-devel mailing list