From: Tilghman Lesher Date: Fri, 11 Jun 2010 18:23:05 +0000 (+0000) Subject: For SpeeX, 0 bits remaining is valid and does not need an emitted warning. X-Git-Tag: 1.4.34-rc1~2^2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba3f2b0d204e8da0cffef2a562d2c239d0ab9905;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@269960 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/frame.c b/main/frame.c index d357694887..560cf1a534 100644 --- a/main/frame.c +++ b/main/frame.c @@ -1451,7 +1451,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; }