diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-16 19:40:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-16 19:40:57 +0200 |
commit | 9de5b11d58eda59fae6faf1b4238612fa5b4fc1f (patch) | |
tree | adc742fd86a06e37e32f8b8cb3109b6ea78e0935 /libswresample/swresample-test.c | |
parent | dd3e5baa59964d0e98ff94b159684d03db32553e (diff) | |
download | ffmpeg-9de5b11d58eda59fae6faf1b4238612fa5b4fc1f.tar.gz |
swr-test: fix division by 0
Fixes CID733739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample-test.c')
-rw-r--r-- | libswresample/swresample-test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample-test.c b/libswresample/swresample-test.c index 7260a767c2..a0dfe28908 100644 --- a/libswresample/swresample-test.c +++ b/libswresample/swresample-test.c @@ -372,7 +372,7 @@ int main(int argc, char **argv){ sse= sum_aa + sum_bb - 2*sum_ab; if(sse < 0 && sse > -0.00001) sse=0; //fix rounding error - fprintf(stderr, "[e:%f c:%f max:%f] len:%5d\n", sqrt(sse/out_count), sum_ab/(sqrt(sum_aa*sum_bb)), maxdiff, out_count); + fprintf(stderr, "[e:%f c:%f max:%f] len:%5d\n", out_count ? sqrt(sse/out_count) : 0, sum_ab/(sqrt(sum_aa*sum_bb)), maxdiff, out_count); } flush_i++; |