diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-05 12:46:11 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-05 12:46:11 +0400 |
commit | 16a565d0cbb7e753f594236c60bbcc66657024f6 (patch) | |
tree | d527b6a6de7906852fad6734ce4481b5d0882428 /libavutil/eval.c | |
parent | e6d88f63a805be3a866fe76f7453e8da71bc2e00 (diff) |
eval/fate: try to fix nan printing format failures.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r-- | libavutil/eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index 066bf7bab5..3833ca87f2 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -659,7 +659,11 @@ 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)", |