[FFmpeg-devel] [PATCH] cmdutils: make show_usage() use av_log()

Stefano Sabatini stefasab at gmail.com
Sat Jan 7 11:10:30 CET 2012


On date Friday 2012-01-06 19:46:34 +0100, Michael Niedermayer encoded:
> On Fri, Jan 06, 2012 at 07:13:48PM +0100, Stefano Sabatini wrote:
> > Avoid printing on stdout when show_usage is used in an error message.
> > ---
> >  avconv.c  |    6 +++---
> >  ffmpeg.c  |    6 +++---
> >  ffplay.c  |    6 +++---
> >  ffprobe.c |    6 +++---
> >  4 files changed, 12 insertions(+), 12 deletions(-)
> > 
> > diff --git a/avconv.c b/avconv.c
> > index e02139d..92a5257 100644
> > --- a/avconv.c
> > +++ b/avconv.c
> > @@ -4187,9 +4187,9 @@ static int opt_audio_qscale(OptionsContext *o, const char *opt, const char *arg)
> >  
> >  static void show_usage(void)
> >  {
> > -    printf("Hyper fast Audio and Video encoder\n");
> > -    printf("usage: %s [options] [[infile options] -i infile]... {[outfile options] outfile}...\n", program_name);
> > -    printf("\n");
> > +    av_log(NULL, AV_LOG_INFO, "Hyper fast Audio and Video encoder\n");
> > +    av_log(NULL, AV_LOG_INFO, "usage: %s [options] [[infile options] -i infile]... {[outfile options] outfile}...\n", program_name);
> 
> > +    av_log(NULL, AV_LOG_INFO, printf("\n");
> 
> i dont think that compiles
> 
> rest LGTM

Fixed & pushed.
-- 
FFmpeg = Faithless & Fundamentalist Majestic Puritan Experimenting Gymnast


More information about the ffmpeg-devel mailing list