summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-07-25 20:42:04 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-07-26 15:56:32 -0700
commit02ac28229aa6824455e2cbc2389355575913041a (patch)
treec64132da3ce0cc2fa0c05295ad4b3fb86c8dda52 /libavutil
parent87849592345fcfedc97f21237d50246202337062 (diff)
downloadffmpeg-02ac28229aa6824455e2cbc2389355575913041a.tar.gz
eval: fix printing of NaN in eval fate test.
This fixes "make fate-eval" on MSVC builds. Without this, the test outputs "-1.#NaN" instead of "nan" on MSVS 2010.
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index ff3191de62..d274272205 100644
--- 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)",