projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8784959
)
eval: fix printing of NaN in eval fate test.
author
Ronald S. Bultje
<rsbultje@gmail.com>
Thu, 26 Jul 2012 03:42:04 +0000
(20:42 -0700)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Thu, 26 Jul 2012 22:56:32 +0000
(15:56 -0700)
This fixes "make fate-eval" on MSVC builds. Without this, the test outputs
"-1.#NaN" instead of "nan" on MSVS 2010.
libavutil/eval.c
patch
|
blob
|
history
diff --git
a/libavutil/eval.c
b/libavutil/eval.c
index
ff3191d
..
d274272
100644
(file)
--- a/
libavutil/eval.c
+++ b/
libavutil/eval.c
@@
-636,7
+636,10
@@
int main(int argc, char **argv)
av_expr_parse_and_eval(&d, *expr,
const_names, const_values,
NULL, NULL, NULL, NULL, NULL, 0, NULL);
- printf("'%s' -> %f\n\n", *expr, d);
+ if (isnan(d))
+ printf("'%s' -> nan\n\n", *expr);
+ else
+ printf("'%s' -> %f\n\n", *expr, d);
}
av_expr_parse_and_eval(&d, "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",