projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9982ed
)
Fix unaligned accesses by doing bytewise access until aligned, then
author
Ramiro Polla
<ramiro@lisha.ufsc.br>
Mon, 15 Jun 2009 14:38:30 +0000
(14:38 +0000)
committer
Jeff Downs
<heydowns@borg.com>
Mon, 15 Jun 2009 14:38:30 +0000
(14:38 +0000)
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
libavcodec/mlp.c
patch
|
blob
|
history
diff --git
a/libavcodec/mlp.c
b/libavcodec/mlp.c
index
c522617
..
a290e46
100644
(file)
--- a/
libavcodec/mlp.c
+++ b/
libavcodec/mlp.c
@@
-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);