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

Michael Niedermayer michaelni
Mon Aug 3 19:02:58 CEST 2009


On Mon, Aug 03, 2009 at 02:33:17PM +0300, ?smail D?nmez wrote:
> 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

ffmpeg.c shouldnt be including the #define perror plea... code


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090803/1e240d07/attachment.pgp>



More information about the ffmpeg-devel mailing list