diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-06-26 17:06:17 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-06-26 17:06:17 +0000 |
commit | 7b84cf6fa63c40a4d0aa9373095e7021eaf708a8 (patch) | |
tree | fed62da6065b0ba8588fe15f5adcc22c8e0d638a /codecs/codec_alaw.c | |
parent | 4f32bf72f97ad4151065fcb878c142eb7d284ba7 (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_alaw.c')
-rw-r--r-- | codecs/codec_alaw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c index b2f4f9435..a261dedb7 100644 --- a/codecs/codec_alaw.c +++ b/codecs/codec_alaw.c @@ -45,7 +45,7 @@ static int alawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) { int i = f->samples; unsigned char *src = f->data.ptr; - int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples; + int16_t *dst = pvt->outbuf.i16 + pvt->samples; pvt->samples += i; pvt->datalen += i * 2; /* 2 bytes/sample */ @@ -60,7 +60,7 @@ static int alawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) static int lintoalaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) { int i = f->samples; - char *dst = pvt->outbuf + pvt->samples; + char *dst = pvt->outbuf.c + pvt->samples; int16_t *src = f->data.ptr; pvt->samples += i; |