[FFmpeg-cvslog] r19200 - trunk/libavcodec/mlp.c
heydowns
subversion
Mon Jun 15 16:38:31 CEST 2009
Author: heydowns
Date: Mon Jun 15 16:38:30 2009
New Revision: 19200
Log:
Fix unaligned accesses by doing bytewise access until aligned, then
continuing in 32-bit quantities.
Fixes crash observed on sparc during FATE mlp test.
Patch by Ramiro.
Modified:
trunk/libavcodec/mlp.c
Modified: trunk/libavcodec/mlp.c
==============================================================================
--- trunk/libavcodec/mlp.c Mon Jun 15 10:38:11 2009 (r19199)
+++ trunk/libavcodec/mlp.c Mon Jun 15 16:38:30 2009 (r19200)
@@ -96,6 +96,8 @@ uint8_t ff_mlp_calculate_parity(const ui
uint32_t scratch = 0;
const uint8_t *buf_end = buf + buf_size;
+ for (; ((intptr_t) buf & 3) && buf < buf_end; buf++)
+ scratch ^= *buf;
for (; buf < buf_end - 3; buf += 4)
scratch ^= *((const uint32_t*)buf);
More information about the ffmpeg-cvslog
mailing list