]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 269976 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 11 Jun 2010 18:32:13 +0000 (18:32 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 11 Jun 2010 18:32:13 +0000 (18:32 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@269977 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/frame.c

index cb78800fe6af6368f67875c8cc01574f2262b693..854bc3781012abb8f4654d66b20828ff36598a00 100644 (file)
@@ -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;
                }