mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 11:44:44 +00:00
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. Originally committed as revision 19200 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d9982edfed
commit
7cc8d616aa
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user