summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Lazarov <mlazarov@gmail.com>2012-03-30 23:56:56 -0700
committerJanne Grunau <janne-libav@jannau.net>2012-07-14 13:33:25 +0200
commitcaac3ab6efde4fc9769e8a7472269356f262970a (patch)
treeb961960a125d19824567153bb8da398abe76d0ce
parentf30260d32a92c7e12984dd6fb2238da35d6a4c03 (diff)
downloadffmpeg-streaming-caac3ab6efde4fc9769e8a7472269356f262970a.zip
ffmpeg-streaming-caac3ab6efde4fc9769e8a7472269356f262970a.tar.gz
eval: fix swapping of lt() and lte()
CC: libav-stable@libav.org
-rw-r--r--libavutil/eval.c4
-rw-r--r--tests/ref/fate/eval6
2 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index f2d619f..77af2a3 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -279,8 +279,8 @@ static int parse_primary(AVExpr **e, Parser *p)
else if (strmatch(next, "eq" )) d->type = e_eq;
else if (strmatch(next, "gte" )) d->type = e_gte;
else if (strmatch(next, "gt" )) d->type = e_gt;
- else if (strmatch(next, "lte" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gt; }
- else if (strmatch(next, "lt" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gte; }
+ else if (strmatch(next, "lte" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gte; }
+ else if (strmatch(next, "lt" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gt; }
else if (strmatch(next, "ld" )) d->type = e_ld;
else if (strmatch(next, "isnan" )) d->type = e_isnan;
else if (strmatch(next, "isinf" )) d->type = e_isinf;
diff --git a/tests/ref/fate/eval b/tests/ref/fate/eval
index b6ca0fa..13c218c 100644
--- a/tests/ref/fate/eval
+++ b/tests/ref/fate/eval
@@ -95,16 +95,16 @@ Evaluating 'st(1, 123); ld(1)'
'st(1, 123); ld(1)' -> 123.000000
Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)'
-'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 4950.000000
+'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 5050.000000
Evaluating 'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)'
-'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 144.000000
+'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 233.000000
Evaluating 'while(0, 10)'
'while(0, 10)' -> nan
Evaluating 'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))'
-'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 100.000000
+'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 101.000000
Evaluating 'isnan(1)'
'isnan(1)' -> 0.000000
OpenPOWER on IntegriCloud