[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec a52dec.c, 1.10, 1.11 ac3dec.c, 1.10, 1.11 h263.c, 1.288, 1.289 h264.c, 1.151, 1.152 imgresample.c, 1.24, 1.25 mjpeg.c, 1.112, 1.113 motion_est.c, 1.109, 1.110 msmpeg4.c, 1.89, 1.90 parser.c, 1.27, 1.28

Rich Felker dalias
Sat Aug 27 03:59:32 CEST 2005


On Fri, Aug 26, 2005 at 10:41:12PM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Fri, Aug 26, 2005 at 04:33:36PM -0400, Rich Felker wrote:
> > On Fri, Aug 26, 2005 at 09:05:46PM +0200, Michael Niedermayer CVS wrote:
> > > Index: imgresample.c
> > > ===================================================================
> > > RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/imgresample.c,v
> > > retrieving revision 1.24
> > > retrieving revision 1.25
> > > diff -u -d -r1.24 -r1.25
> > > --- imgresample.c	12 Jan 2005 00:59:41 -0000	1.24
> > > +++ imgresample.c	26 Aug 2005 19:05:44 -0000	1.25
> > > @@ -643,11 +643,13 @@
> > >  
> > >  void save_pgm(const char *filename, uint8_t *img, int xsize, int ysize)
> > >  {
> > > +#undef fprintf
> > >      FILE *f;
> > >      f=fopen(filename,"w");
> > >      fprintf(f,"P5\n%d %d\n%d\n", xsize, ysize, 255);
> > >      fwrite(img,1, xsize * ysize,f);
> > >      fclose(f);
> > > +#define fprintf please_use_av_log
> > >  }
> > 
> > IMO this change suggests that we have the wrong approach to protecting
> > against bad output. fprintf is totally valid to use; what's invalid is
> > stderr. I vote to remove the #define fprintf and instead #define
> > stderr please_use_av_log. :)
> 
> agree, and you should also change stdout :)

yep. however stdout is also accessible via normal printf, so leave
printf banned too. :)

rich





More information about the ffmpeg-cvslog mailing list