[FFmpeg-devel] [PATCH] Fix printf usage in vhook
Stefano Sabatini
stefano.sabatini-lala
Thu Sep 4 22:55:24 CEST 2008
On date Thursday 2008-09-04 12:54:48 +0800, JonY encoded:
> Stefano Sabatini wrote:
> > On date Wednesday 2008-09-03 19:04:27 +0800, JonY encoded:
> >> Patch fixes some undefined references to "please_use_av_log". Do change
> >> the AV_LOG levels if inappropriate.
> >>
> >> Any ideas fix fprintfs writing to files?
> >>> vhook/fish.c:369: fprintf(f, "P6 %d %d 255\n", width, height);
> >>> vhook/ppm.c:287: fprintf( out, "P6\n%d %d\n255\n", width, height );
> >
> > You have to redefine the av_log() behaviour, setting the av_log callback
> > function.
> >
> Do you have any suggestions where the callback should be pointed to?
Now that I think at it that lines of code print to some file, but
they're not used for logging purpose so I think it makes no sense to
use av_log, it would make more sense to #undef fprintf in the files.
[...]
> > As you may know VHOOK is harshly *deprecated*, nonetheless since we
> > don't know how much time libavfilter will stay in the limbo, maybe it
> > would still make sense to apply this.
> >
> > Regards.
>
> Thanks, I know its depreciated, but I don't know why the errors appeared
> now, just trying to correct it.
Look at libavutil/internal.h which is included in libavutil/common.h,
printing functions shouldn't be used in a library.
Regards.
--
FFmpeg = Frightening and Foolish Meaningful Patchable Enlightened Generator
More information about the ffmpeg-devel
mailing list