aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/translate.h
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-26 17:06:17 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-26 17:06:17 +0000
commita1fa45760e632d9a689d0476b25409af81a4f5d1 (patch)
treefed62da6065b0ba8588fe15f5adcc22c8e0d638a /include/asterisk/translate.h
parente4747d0d1c05c97e56dabb236b0195327b1e8ee2 (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 'include/asterisk/translate.h')
-rw-r--r--include/asterisk/translate.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h
index 97f10283f..01841ee01 100644
--- a/include/asterisk/translate.h
+++ b/include/asterisk/translate.h
@@ -136,14 +136,19 @@ struct ast_translator {
*/
struct ast_trans_pvt {
struct ast_translator *t;
- struct ast_frame f; /*!< used in frameout */
- int samples; /*!< samples available in outbuf */
+ struct ast_frame f; /*!< used in frameout */
+ int samples; /*!< samples available in outbuf */
/*! \brief actual space used in outbuf */
int datalen;
- void *pvt; /*!< more private data, if any */
- char *outbuf; /*!< the useful portion of the buffer */
- plc_state_t *plc; /*!< optional plc pointer */
- struct ast_trans_pvt *next; /*!< next in translator chain */
+ void *pvt; /*!< more private data, if any */
+ union {
+ char *c; /*!< the useful portion of the buffer */
+ unsigned char *uc; /*!< the useful portion of the buffer */
+ int16_t *i16;
+ uint8_t *ui8;
+ } outbuf;
+ plc_state_t *plc; /*!< optional plc pointer */
+ struct ast_trans_pvt *next; /*!< next in translator chain */
struct timeval nextin;
struct timeval nextout;
unsigned int destroy:1;