[FFmpeg-devel] [PATCH 09/12] Change the order of parameters for ff_parse_and_eval_expr(), place the names before the values.

Stefano Sabatini stefano.sabatini-lala
Thu May 13 00:59:37 CEST 2010


On date Monday 2010-05-10 02:17:56 +0200, Michael Niedermayer encoded:
> On Mon, May 10, 2010 at 01:16:01AM +0200, Stefano Sabatini wrote:
> > On date Sunday 2010-05-09 23:44:15 +0200, Michael Niedermayer encoded:
> > > On Mon, Apr 12, 2010 at 12:37:58AM +0200, Stefano Sabatini wrote:
> > > > This looks more readable, as the user is expected to know the names
> > > > before the values, the other order looks awkward.
> > > [...]
> > > >                  else if(!strcmp(buf, "none"   )) d= 0;
> > > >                  else if(!strcmp(buf, "all"    )) d= ~0;
> > > >                  else {
> > > > -                    ff_parse_and_eval_expr(&d, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error);
> > > > +                    ret = ff_parse_and_eval_expr(&d, buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, obj);
> > > >                      if (isnan(d)) {
> > > >                          av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", val);
> > > > -                        return AVERROR(EINVAL);
> > > > +                        return ret;
> > > >                      }
> > > >                  }
> > > 
> > > is this change supposed to be in this patch?
> > 
> > No I messed up the patch after many rebasings, I'll update the patch
> > if there is consensus amongst what the patch should do.
> 
> changing the order of parameters is ok if you want that

Thanks, patch attached, I'll apply it in few days if you don't mind to
review it.

Regards.
-- 
FFmpeg = Formidable and Furious Majestic Puristic Exploitable Gigant



More information about the ffmpeg-devel mailing list