Clean the error for IAX when using SPEEX codec
authorMartin Pycko <martinp@digium.com>
Mon, 21 Apr 2003 18:00:26 +0000 (18:00 +0000)
committerMartin Pycko <martinp@digium.com>
Mon, 21 Apr 2003 18:00:26 +0000 (18:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@878 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax.c

index 9f5724c..426bc58 100755 (executable)
@@ -659,6 +659,9 @@ static int get_samples(struct ast_frame *f)
        case AST_FORMAT_ADPCM:
                samples = f->datalen *2;
                break;
+       case AST_FORMAT_SPEEX:
+               samples = (f->datalen/39)*160;
+               break;
        default:
                ast_log(LOG_WARNING, "Don't know how to calculate samples on %d packets\n", f->subclass);
        }