[FFmpeg-devel] ffmepg.c: change "fprintf(stderr" to "av_log(NULL, AV_LOG_ERROR"
Benoit Fouet
benoit.fouet
Mon Feb 16 13:42:38 CET 2009
On 02/16/2009 12:24 PM, Pawe? Ko?odziej wrote:
> Dnia 2009-02-16, Pn o godzinie 12:08 +0100, Benoit Fouet pisze:
>
>> On 02/16/2009 11:38 AM, Benoit Fouet wrote:
>>
>>> Hi,
>>>
>>> On 02/16/2009 11:35 AM, Pawe? Ko?odziej wrote:
>>>
>>>
>>>> Hi,
>>>> In ffmpeg.c there is a lot (about 80) places like:
>>>>
>>>> fprintf(stderr, "yada yada yada\n");
>>>> av_exit(1);
>>>>
>>>>
>>>>
>>>>
>>> these are error messages from ffmpeg application, and should IMHO remain
>>> as such.
>>>
>>>
>>>
>>>> Is there any reason to not change "fprintf(stderr" to
>>>> "av_log(NULL,AV_LOG_ERROR" ? If not then I will do this change.
>>>>
>>>>
>>>>
>>>>
>>> av_log is used inside libav* to log things, ffmpeg is not part of libav*
>>> but uses them...
>>>
>>>
>>>
>> as a result, here is a patch to change calls to av_log to fprintf to stderr.
>>
>
> I still belive that application should use one logging system for all
> messages. In case of ffmpeg it's natural for me to use av_log since rest
> of ffmpeg (also known as libav*) use is.
>
>
ffmpeg is a program that uses the libav* libraries, just like ffplay and
ffserver.
I still fail to see why it should use av_log() instead of (f)printf to
display its messages.
Ben
More information about the ffmpeg-devel
mailing list