diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-25 20:42:04 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-26 15:56:32 -0700 |
commit | 02ac28229aa6824455e2cbc2389355575913041a (patch) | |
tree | c64132da3ce0cc2fa0c05295ad4b3fb86c8dda52 /libavutil | |
parent | 87849592345fcfedc97f21237d50246202337062 (diff) | |
download | ffmpeg-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.c | 5 |
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)", |