[FFmpeg-devel] [PATCH] Remove "Error parsing options string [...]" messages.

Clément Bœsch ubitux at gmail.com
Thu Aug 9 08:10:48 CEST 2012


On Thu, Aug 09, 2012 at 01:11:36AM +0200, Stefano Sabatini wrote:
> On date Thursday 2012-08-09 00:51:50 +0200, Clément Bœsch encoded:
> > This reduces from 3 to 2 messages for the same syntax error in ffprobe,
> > and from 4 to 3 in filters.
> > ---
> >  ffprobe.c                      | 24 ++++++------------------
> >  libavfilter/af_aformat.c       |  4 +---
> >  libavfilter/af_amix.c          |  4 +---
> >  libavfilter/af_asetnsamples.c  |  4 +---
> >  libavfilter/af_asyncts.c       |  4 +---
> >  libavfilter/af_channelmap.c    |  4 +---
> >  libavfilter/af_channelsplit.c  |  4 +---
> >  libavfilter/af_join.c          |  4 +---
> >  libavfilter/af_silencedetect.c |  4 +---
> >  libavfilter/asrc_anullsrc.c    |  4 +---
> >  libavfilter/asrc_flite.c       |  4 +---
> >  libavfilter/avf_showwaves.c    |  4 +---
> >  libavfilter/buffersrc.c        |  8 ++------
> >  libavfilter/src_movie.c        |  4 +---
> >  libavfilter/vf_ass.c           |  4 +---
> >  libavfilter/vf_blackdetect.c   |  4 +---
> >  libavfilter/vf_delogo.c        |  4 +---
> >  libavfilter/vf_drawtext.c      |  4 +---
> >  libavfilter/vsrc_cellauto.c    |  4 +---
> >  libavfilter/vsrc_life.c        |  4 +---
> >  libavfilter/vsrc_mandelbrot.c  |  4 +---
> >  libavfilter/vsrc_mptestsrc.c   |  4 +---
> >  libavfilter/vsrc_testsrc.c     |  4 +---
> >  23 files changed, 29 insertions(+), 87 deletions(-)
> > 
> > diff --git a/ffprobe.c b/ffprobe.c
> > index e1ad6a7..6de9eb3 100644
> > --- a/ffprobe.c
> > +++ b/ffprobe.c
> > @@ -457,10 +457,8 @@ static av_cold int default_init(WriterContext *wctx, const char *args, void *opa
> >      av_opt_set_defaults(def);
> >  
> >      if (args &&
> > -        (err = (av_set_options_string(def, args, "=", ":"))) < 0) {
> > -        av_log(wctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args);
> > +        (err = (av_set_options_string(def, args, "=", ":"))) < 0)
> >          return err;
> > -    }
> >  
> >      return 0;
> 
> Makes sense (the rule of thumb is that if we provide a log context,
> the called function should deal with error messages).
> 
[...]
> 
> LGTM if my eyes don't betray me.

Thanks, applied.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120809/d4c41575/attachment.asc>


More information about the ffmpeg-devel mailing list