[FFmpeg-cvslog] eval: Fix eval test with ftrapv

Michael Niedermayer git at videolan.org
Tue Oct 9 06:19:18 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct  9 05:55:15 2012 +0200| [03f5043f5d13446f3a8af4a838a4e614190d2a51] | committer: Michael Niedermayer

eval: Fix eval test with ftrapv

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03f5043f5d13446f3a8af4a838a4e614190d2a51
---

 libavutil/eval.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/eval.c b/libavutil/eval.c
index dc2fb45..931ad6b 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -258,7 +258,7 @@ static double eval_expr(Parser *p, AVExpr *e)
                 case e_gte: return e->value * (d >= d2 ? 1.0 : 0.0);
                 case e_pow: return e->value * pow(d, d2);
                 case e_mul: return e->value * (d * d2);
-                case e_div: return e->value * (d / d2);
+                case e_div: return e->value * ((!CONFIG_FTRAPV || d2 ) ? (d / d2) : d * INFINITY);
                 case e_add: return e->value * (d + d2);
                 case e_last:return e->value * d2;
                 case e_st : return e->value * (p->var[av_clip(d, 0, VARS-1)]= d2);



More information about the ffmpeg-cvslog mailing list