Fix divide by zero (bugs #2268 and 2259)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 21 years ago
parent 3bcff2d2f9
commit 3ca96a1317

@ -1229,6 +1229,9 @@ static int __ast_dsp_silence(struct ast_dsp *dsp, short *s, int len, int *totals
int x;
int res = 0;
if (!len)
return 0;
accum = 0;
for (x=0;x<len; x++)
accum += abs(s[x]);

Loading…
Cancel
Save