summaryrefslogtreecommitdiff
path: root/codecs/codec_g722.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-06-26 17:06:17 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-06-26 17:06:17 +0000
commit7b84cf6fa63c40a4d0aa9373095e7021eaf708a8 (patch)
treefed62da6065b0ba8588fe15f5adcc22c8e0d638a /codecs/codec_g722.c
parent4f32bf72f97ad4151065fcb878c142eb7d284ba7 (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: https://origsvn.digium.com/svn/asterisk/trunk@125386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'codecs/codec_g722.c')
-rw-r--r--codecs/codec_g722.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/codecs/codec_g722.c b/codecs/codec_g722.c
index a574136e8..19e6b33b1 100644
--- a/codecs/codec_g722.c
+++ b/codecs/codec_g722.c
@@ -107,7 +107,7 @@ static int g722tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
/* g722_decode expects the samples to be in the invalid samples / 2 format */
in_samples = f->samples / 2;
- out_samples = g722_decode(&tmp->g722, (int16_t *) &pvt->outbuf[pvt->samples * sizeof(int16_t)],
+ out_samples = g722_decode(&tmp->g722, &pvt->outbuf.i16[pvt->samples * sizeof(int16_t)],
(uint8_t *) f->data.ptr, in_samples);
pvt->samples += out_samples;
@@ -122,7 +122,7 @@ static int lintog722_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
struct g722_encoder_pvt *tmp = pvt->pvt;
int outlen;
- outlen = g722_encode(&tmp->g722, (uint8_t *) (&pvt->outbuf[pvt->datalen]),
+ outlen = g722_encode(&tmp->g722, (&pvt->outbuf.ui8[pvt->datalen]),
(int16_t *) f->data.ptr, f->samples);
pvt->samples += outlen * 2;