[FFmpeg-devel] [PATCH 2/4] cmdutils: switch PRINT_CODEC_SUPPORTED to av_log

Michael Niedermayer michaelni at gmx.at
Fri Apr 19 16:09:21 CEST 2013


On Tue, Oct 23, 2012 at 10:48:34PM +0200, Stefano Sabatini wrote:
> On date Monday 2012-10-22 02:01:35 +0200, Michael Niedermayer encoded:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  cmdutils.c |   16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/cmdutils.c b/cmdutils.c
> > index 8467a5a..5b9111a 100644
> > --- a/cmdutils.c
> > +++ b/cmdutils.c
> > @@ -808,17 +808,17 @@ int show_formats(void *optctx, const char *opt, const char *arg)
> >      return 0;
> >  }
> >  
> > -#define PRINT_CODEC_SUPPORTED(codec, field, type, list_name, term, get_name) \
> > +#define PRINT_CODEC_SUPPORTED(ctx, codec, field, type, list_name, term, get_name) \
> >      if (codec->field) {                                                      \
> >          const type *p = codec->field;                                        \
> >                                                                               \
> > -        printf("    Supported " list_name ":");                              \
> > +        av_log(ctx, AV_LOG_INFO, "    Supported " list_name ":");            \
> 
> I think this should be printed to stdout, since it is what the user
> requested (e.g. in case of parsing | grepping), av_log() may defeat or
> override that in inpredictable ways.

It does print to stdout, see log_callback_help()

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

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130419/9a816d11/attachment.asc>


More information about the ffmpeg-devel mailing list