diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-17 19:19:12 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-17 19:19:12 +0000 |
commit | 52271eba5e7ff9debb1d0b83faf5d8eeea2fbe35 (patch) | |
tree | 0c2ebd0ad6a02fd718c311c9b85b4c738f7e2302 | |
parent | e232609d7746620f802110111e62f9bb077d9d25 (diff) |
Fix transmissions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@864 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channels/chan_iax.c | 5 | ||||
-rwxr-xr-x | channels/chan_iax2.c | 2 | ||||
-rwxr-xr-x | rtp.c | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/channels/chan_iax.c b/channels/chan_iax.c index deb739b0f..9f5724c9e 100755 --- a/channels/chan_iax.c +++ b/channels/chan_iax.c @@ -638,7 +638,10 @@ static int get_samples(struct ast_frame *f) samples = 160 * (f->datalen / 33); break; case AST_FORMAT_ILBC: - samples = 240 * (f->datalen / 52); + samples = 240 * (f->datalen / 50); + break; + case AST_FORMAT_G729A: + samples = 160 * (f->datalen / 20); break; case AST_FORMAT_SLINEAR: samples = f->datalen / 2; diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index d7dcd47c5..8b9159781 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -539,7 +539,7 @@ static int get_samples(struct ast_frame *f) samples = 240 /* XXX Not necessarily true XXX */; break; case AST_FORMAT_ILBC: - samples = 240 * (f->datalen / 52); + samples = 240 * (f->datalen / 50); break; case AST_FORMAT_GSM: samples = 160 * (f->datalen / 33); @@ -334,7 +334,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) rtp->f.samples = 160 * (rtp->f.datalen / 33); break; case AST_FORMAT_ILBC: - rtp->f.samples = 240 * (rtp->f.datalen / 52); + rtp->f.samples = 240 * (rtp->f.datalen / 50); break; case AST_FORMAT_ADPCM: rtp->f.samples = rtp->f.datalen * 2; @@ -717,7 +717,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec pred = rtp->lastts + (f->datalen * 160 / 33); break; case AST_FORMAT_ILBC: - pred = rtp->lastts + (f->datalen * 240 / 52); + pred = rtp->lastts + (f->datalen * 240 / 50); break; case AST_FORMAT_G723_1: pred = rtp->lastts + g723_samples(f->data, f->datalen); @@ -833,7 +833,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f) break; case AST_FORMAT_ILBC: if (!rtp->smoother) { - rtp->smoother = ast_smoother_new(52); + rtp->smoother = ast_smoother_new(50); } if (!rtp->smoother) { ast_log(LOG_WARNING, "Unable to create ILBC smoother :(\n"); |