[FFmpeg-devel] [PATCH] lavu/eval: add ifelse function

Stefano Sabatini stefasab at gmail.com
Wed Jan 23 00:58:15 CET 2013


On date Tuesday 2013-01-22 20:39:21 -0300, James Almer encoded:
> On 22/01/13 8:03 PM, Stefano Sabatini wrote:
> > @@ -595,6 +597,9 @@ static int verify_expr(AVExpr *e)
> >          case e_taylor:
> >              return verify_expr(e->param[0]) && verify_expr(e->param[1])
> >                     && (!e->param[2] || verify_expr(e->param[2]));
> > +        case e_ifelse:
> > +            return verify_expr(e->param[0]) && verify_expr(e->param[1])
> > +                   && (!e->param[2] || verify_expr(e->param[2]));
> >          default: return verify_expr(e->param[0]) && verify_expr(e->param[1]) && !e->param[2];
> 
> case e_taylor:
> case e_ifelse:
>             return verify_expr(e->param[0]) && verify_expr(e->param[1])
>                    && (!e->param[2] || verify_expr(e->param[2]));
> 
> No need to put the same return line twice.

Up, simpler/handier.
-- 
FFmpeg = Frenzy Fanciful Martial Peaceless Evil Gargoyle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavu-eval-extend-if-ifnot-functions-to-accept-a-thir.patch
Type: text/x-diff
Size: 3980 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130123/73441a6f/attachment.bin>


More information about the ffmpeg-devel mailing list