aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-11 18:32:13 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-11 18:32:13 +0000
commitb5b1ef1e6733e2ec320f5b414033d72c2ed50502 (patch)
treea892ed1587b9fed55e6d2f67b2e8679f42233fe4
parent67c79ab8abaf2af8019b835deab1844e6a4bc13d (diff)
Merged revisions 269976 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r269976 | tilghman | 2010-06-11 13:31:14 -0500 (Fri, 11 Jun 2010) | 15 lines Merged revisions 269960 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r269960 | tilghman | 2010-06-11 13:23:05 -0500 (Fri, 11 Jun 2010) | 8 lines For SpeeX, 0 bits remaining is valid and does not need an emitted warning. (closes issue #15762) Reported by: nblasgen Patches: issue15672.patch uploaded by pabelanger (license 224) Tested by: nblasgen ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@269977 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/frame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/frame.c b/main/frame.c
index cb78800fe..854bc3781 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -1394,7 +1394,9 @@ static int speex_samples(unsigned char *data, int len)
}
bit += off;
- if ((len * 8 - bit) < 5) {
+ if ((len * 8 - bit) == 0) {
+ break;
+ } else if ((len * 8 - bit) < 5) {
ast_log(LOG_WARNING, "Not enough bits remaining after wide band for speex samples.\n");
break;
}