[FFmpeg-devel] [PATCH] add colours to warnings and errors

James Darnley james.darnley
Tue Apr 27 01:06:15 CEST 2010


2010/4/27 M?ns Rullg?rd <mans at mansr.com>:
> James Darnley <james.darnley at gmail.com> writes:
>
>> 2010/4/27 M?ns Rullg?rd <mans at mansr.com>:
>>> James Darnley <james.darnley at gmail.com> writes:
>>>
>>>> 2010/4/27 M?ns Rullg?rd <mans at mansr.com>:
>>>>> James Darnley <james.darnley at gmail.com> writes:
>>>>>
>>>>>> Right. ?See attached
>>>>>>
>>>>>> Index: libavutil/log.c
>>>>>> ===================================================================
>>>>>> --- libavutil/log.c ? (revision 22960)
>>>>>> +++ libavutil/log.c ? (working copy)
>>>>>> @@ -24,6 +24,10 @@
>>>>>> ? * logging functions
>>>>>> ? */
>>>>>>
>>>>>> +#ifdef _WIN32
>>>>>> +#include <windows.h>
>>>>>> +#include <string.h>
>>>>>> +#endif
>>>>>> ?#include <unistd.h>
>>>>>> ?#include <stdlib.h>
>>>>>> ?#include "avutil.h"
>>>>>> @@ -34,18 +38,76 @@
>>>>>> ?#endif
>>>>>> ?int av_log_level = AV_LOG_INFO;
>>>>>>
>>>>>> +/* FIXME: On Windows isatty() returns true when ANSI color codes won't work.
>>>>>> +Some hack to detect output to other terminals would be good, fixing the other
>>>>>> +terminals would be better. One probable exception is when the user has
>>>>>> +ANSI.SYS loaded but the Windows API should then still work. */
>>>>>
>>>>> You still have a FIXME here. ?That's not acceptable.
>>>>
>>>> I'll delete it then if that'll satisfy you. ?Or would you prefer the
>>>> whole text to be gone.
>>>
>>> I want the hack to be gone.
>>
>> What hack would that be?
>
> Whatever prompted you to put FIXME there in the first place.
>

I meant that if someone desired they could "fix" isatty() so it can
know if ffmpeg is printing to a not-default cygwin terminal  At
present it returns false because stderr is always connected to a pipe.



More information about the ffmpeg-devel mailing list