Commit 3c43c75a authored by heydowns's avatar heydowns

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19200 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6b62217b
......@@ -96,6 +96,8 @@ uint8_t ff_mlp_calculate_parity(const uint8_t *buf, unsigned int buf_size)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment