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

Michael Niedermayer michaelni
Mon May 10 02:17:56 CEST 2010


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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100510/5f381674/attachment.pgp>



More information about the ffmpeg-devel mailing list