]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Return g729 and g723.1 frames with the number of samples set properly.
authorSean Bright <sean@malleable.com>
Wed, 7 Mar 2012 16:13:45 +0000 (16:13 +0000)
committerSean Bright <sean@malleable.com>
Wed, 7 Mar 2012 16:13:45 +0000 (16:13 +0000)
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 <sruffell@digium.com>
........

Merged revisions 358484 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@358485 65c4cc65-6c06-0410-ace0-fbb531ad65f3

codecs/codec_dahdi.c

index 2fb2a2c4309f1d5fd103d9f7cc394231bc48a4a6..2eec96d06436181fcec78f921a5302ac2df60c57 100644 (file)
@@ -268,13 +268,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;
                ast_format_copy(&pvt->f.subclass.format, &pvt->t->dst_format);
                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;