summaryrefslogtreecommitdiff
path: root/src/libac3/bitstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libac3/bitstream.c')
-rw-r--r--src/libac3/bitstream.c10
1 files changed, 10 insertions, 0 deletions
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
}
//