[FFmpeg-devel] [PATCH] ffmpeg.c : replace perror() by av_log

İsmail Dönmez ismail
Mon Aug 3 13:33:17 CEST 2009


On Mon, Aug 3, 2009 at 2:28 PM, Michael Niedermayer<michaelni at gmx.at> wrote:
> On Sun, Aug 02, 2009 at 08:39:19PM +0300, ?smail D?nmez wrote:
>> Hi,
>>
>> 2009/8/2 M?ns Rullg?rd <mans at mansr.com>:
>> >> Index: ffmpeg.c
>> >> ===================================================================
>> >> --- ffmpeg.c ?(revision 19566)
>> >> +++ ffmpeg.c ?(working copy)
>> >> @@ -1085,7 +1085,7 @@
>> >> ? ? ?if (!vstats_file) {
>> >> ? ? ? ? ?vstats_file = fopen(vstats_filename, "w");
>> >> ? ? ? ? ?if (!vstats_file) {
>> >> - ? ? ? ? ? ?perror("fopen");
>> >> + ? ? ? ? ? ?av_log(NULL, AV_LOG_ERROR, "Failed to open stats file: %s\n", strerror(errno));
>> >
>> > Maybe it would be nice to print the failing filename too while at it.
>>
>> New patch attached.
>
> Could you first explain the "why" part behind this patch?
> i mean what does it fix or improve?

Just meant to be a nice guy and fix a TODO:

libavutil/internal.h
248:#undef  perror
249:#define perror please_use_av_log_instead_of_perror

Regards.

-- 
?smail D?NMEZ



More information about the ffmpeg-devel mailing list