From f7eb823a7a4551139abd677a2024705012d035c6 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Thu, 22 May 2008 17:10:53 +0000 Subject: Fix a few places where frame data was used directly. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117828 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- codecs/codec_speex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'codecs/codec_speex.c') diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c index 494693182..b9f879535 100644 --- a/codecs/codec_speex.c +++ b/codecs/codec_speex.c @@ -165,7 +165,7 @@ static struct ast_frame *lintospeex_sample(void) f.mallocd = 0; f.offset = 0; f.src = __PRETTY_FUNCTION__; - f.data = slin_speex_ex; + f.data.ptr = slin_speex_ex; return &f; } @@ -180,7 +180,7 @@ static struct ast_frame *speextolin_sample(void) f.mallocd = 0; f.offset = 0; f.src = __PRETTY_FUNCTION__; - f.data = speex_slin_ex; + f.data.ptr = speex_slin_ex; return &f; } @@ -220,7 +220,7 @@ static int speextolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) } /* Read in bits */ - speex_bits_read_from(&tmp->bits, f->data, f->datalen); + speex_bits_read_from(&tmp->bits, f->data.ptr, f->datalen); for (;;) { #ifdef _SPEEX_TYPES_H res = speex_decode_int(tmp->speex, &tmp->bits, fout); @@ -249,7 +249,7 @@ static int lintospeex_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) /* XXX We should look at how old the rest of our stream is, and if it is too old, then we should overwrite it entirely, otherwise we can get artifacts of earlier talk that do not belong */ - memcpy(tmp->buf + pvt->samples, f->data, f->datalen); + memcpy(tmp->buf + pvt->samples, f->data.ptr, f->datalen); pvt->samples += f->samples; return 0; } -- cgit v1.2.3