OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd3e5ba
)
swr-test: fix division by 0
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 16 Oct 2012 17:40:57 +0000
(19:40 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 16 Oct 2012 17:40:57 +0000
(19:40 +0200)
Fixes CID733739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample-test.c
patch
|
blob
|
history
diff --git
a/libswresample/swresample-test.c
b/libswresample/swresample-test.c
index
7260a76
..
a0dfe28
100644
(file)
--- 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++;