changeset 7888:5abf74c67ace

fixed unaligned access (bus error on sparc)
author arpi
date Wed, 23 Oct 2002 23:15:25 +0000
parents 0e5544951425
children e44ec5681211
files libmpcodecs/ad_msadpcm.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_msadpcm.c	Wed Oct 23 23:13:26 2002 +0000
+++ b/libmpcodecs/ad_msadpcm.c	Wed Oct 23 23:15:25 2002 +0000
@@ -44,8 +44,9 @@
 
 #define MS_ADPCM_PREAMBLE_SIZE 6
 
-#define LE_16(x) (le2me_16(*(unsigned short *)(x)))
-#define LE_32(x) (le2me_32(*(unsigned int *)(x)))
+#define LE_16(x) (le2me_16((x)[1]+(256*(x)[0])))
+//#define LE_16(x) (le2me_16(*(unsigned short *)(x)))
+//#define LE_32(x) (le2me_32(*(unsigned int *)(x)))
 
 // useful macros
 // clamp a number between 0 and 88