From 436b928915f56a8bc56fc7065800fad7e474e158 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Thu, 21 Jun 2001 17:34:23 +0000 Subject: solaris and stability patches provided by Juergen Keil CVS patchset: 211 CVS date: 2001/06/21 17:34:23 --- src/libac3/bitstream.c | 10 ++++++++++ src/libac3/bitstream.h | 5 +++++ 2 files changed, 15 insertions(+) (limited to 'src/libac3') diff --git a/src/libac3/bitstream.c b/src/libac3/bitstream.c index 8d771965e..1f4aff54e 100644 --- a/src/libac3/bitstream.c +++ b/src/libac3/bitstream.c @@ -44,8 +44,18 @@ void bitstream_set_ptr (uint8_t * buf) static inline void bitstream_fill_current() { +#ifdef __sparc__ +#warning FIXME: cannot access unaligned pointer on sparc + current_word = + (buffer_start[0] << 24) | + (buffer_start[1] << 16) | + (buffer_start[2] << 8) | + buffer_start[3]; + buffer_start += 4; +#else current_word = *((uint32_t*)buffer_start)++; current_word = swab32(current_word); +#endif } // diff --git a/src/libac3/bitstream.h b/src/libac3/bitstream.h index 84f3287c8..b5d896184 100644 --- a/src/libac3/bitstream.h +++ b/src/libac3/bitstream.h @@ -21,6 +21,11 @@ * */ +#warning FIXME: need WORDS_BIGENDIAN autoconf test +#ifdef __sparc__ +#define WORDS_BIGENDIAN 1 +#endif + //My new and improved vego-matic endian swapping routine //(stolen from the kernel) #ifdef WORDS_BIGENDIAN -- cgit v1.2.3