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
This commit is contained in:
Tilghman Lesher
2008-06-26 17:06:17 +00:00
parent 4f32bf72f9
commit 7b84cf6fa6
13 changed files with 38 additions and 33 deletions

View File

@@ -193,7 +193,7 @@ static int speextolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
the tail location. Read in as many frames as there are */
int x;
int res;
int16_t *dst = (int16_t *)pvt->outbuf;
int16_t *dst = pvt->outbuf.i16;
/* XXX fout is a temporary buffer, may have different types */
#ifdef _SPEEX_TYPES_H
spx_int16_t fout[1024];
@@ -316,7 +316,7 @@ static struct ast_frame *lintospeex_frameout(struct ast_trans_pvt *pvt)
/* Terminate bit stream */
speex_bits_pack(&tmp->bits, 15, 5);
datalen = speex_bits_write(&tmp->bits, pvt->outbuf, pvt->t->buf_size);
datalen = speex_bits_write(&tmp->bits, pvt->outbuf.c, pvt->t->buf_size);
return ast_trans_frameout(pvt, datalen, samples);
}