From: Sean Bright Date: Wed, 7 Mar 2012 16:11:46 +0000 (+0000) Subject: Return g729 and g723.1 frames with the number of samples set properly. X-Git-Tag: 1.8.10.1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acd1d86053f662e06dd6549e7d3d9cb671599413;p=thirdparty%2Fasterisk.git Return g729 and g723.1 frames with the number of samples set properly. If the wctc4xxp returns more than a single packet, we need to update the number of samples in the returned frame accordingly. Acked-by: Shaun Ruffell git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358484 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/codecs/codec_dahdi.c b/codecs/codec_dahdi.c index aa17602854..cc94a832ef 100644 --- a/codecs/codec_dahdi.c +++ b/codecs/codec_dahdi.c @@ -254,13 +254,13 @@ static struct ast_frame *dahdi_encoder_frameout(struct ast_trans_pvt *pvt) } } else { pvt->f.datalen = res; - pvt->f.samples = dahdip->required_samples; pvt->f.frametype = AST_FRAME_VOICE; pvt->f.subclass.codec = 1 << (pvt->t->dstfmt); pvt->f.mallocd = 0; pvt->f.offset = AST_FRIENDLY_OFFSET; pvt->f.src = pvt->t->name; pvt->f.data.ptr = pvt->outbuf.c; + pvt->f.samples = ast_codec_get_samples(&pvt->f); pvt->samples = 0; pvt->datalen = 0;