[FFmpeg-devel] [PATCH 6/7] Implement if(expr, cond) binary function evaluation.

Michael Niedermayer michaelni
Mon Nov 1 01:22:48 CET 2010


On Mon, Nov 01, 2010 at 12:23:32AM +0100, Stefano Sabatini wrote:
> ---
>  doc/eval.texi    |    5 +++++
>  libavutil/eval.c |   11 ++++++++++-
>  2 files changed, 15 insertions(+), 1 deletions(-)
> 
> diff --git a/doc/eval.texi b/doc/eval.texi
> index 2416442..c944b3e 100644
> --- a/doc/eval.texi
> +++ b/doc/eval.texi
> @@ -56,6 +56,11 @@ The function returns the loaded value.
>  Evaluate expression @var{expr} when the expression @var{cond} is
>  true, and returns the value of the last @var{expr} evaluation, or NAN
>  if @var{cond} was always false.
> +
> + at item if(cond, expr)
> +Evaluate expression @var{expr} only if the expression @var{cond} is
> +true, and returns the value of the last @var{expr} evaluation, or NAN
> +if @var{cond} was false.
>  @end table

the syntax is ugly and i dont see how to extend this to else if /else
some parts of the eval code are already quite ugly i object to adding more
ugly confusing syntax, especially without strong advantage for some real
use case.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101101/ee017f04/attachment.pgp>



More information about the ffmpeg-devel mailing list