diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-26 17:06:17 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-26 17:06:17 +0000 |
commit | a1fa45760e632d9a689d0476b25409af81a4f5d1 (patch) | |
tree | fed62da6065b0ba8588fe15f5adcc22c8e0d638a /codecs/codec_gsm.c | |
parent | e4747d0d1c05c97e56dabb236b0195327b1e8ee2 (diff) |
Convert casts to unions, to fix alignment issues on Solaris
(closes issue #12932)
Reported by: snuffy
Patches:
bug_12932_20080627.diff uploaded by snuffy (license 35)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125386 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs/codec_gsm.c')
-rw-r--r-- | codecs/codec_gsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c index 805e79b66..defc1d898 100644 --- a/codecs/codec_gsm.c +++ b/codecs/codec_gsm.c @@ -103,7 +103,7 @@ static int gsmtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) { struct gsm_translator_pvt *tmp = pvt->pvt; int x; - int16_t *dst = (int16_t *)pvt->outbuf; + int16_t *dst = pvt->outbuf.i16; /* guess format from frame len. 65 for MSGSM, 33 for regular GSM */ int flen = (f->datalen % MSGSM_FRAME_LEN == 0) ? MSGSM_FRAME_LEN : GSM_FRAME_LEN; @@ -176,7 +176,7 @@ static struct ast_frame *lintogsm_frameout(struct ast_trans_pvt *pvt) return NULL; while (pvt->samples >= GSM_SAMPLES) { /* Encode a frame of data */ - gsm_encode(tmp->gsm, tmp->buf + samples, (gsm_byte *) pvt->outbuf + datalen); + gsm_encode(tmp->gsm, tmp->buf + samples, (gsm_byte *) pvt->outbuf.c + datalen); datalen += GSM_FRAME_LEN; samples += GSM_SAMPLES; pvt->samples -= GSM_SAMPLES; |