diff options
Diffstat (limited to 'libavcodec/mlp.c')
-rw-r--r-- | libavcodec/mlp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mlp.c b/libavcodec/mlp.c index c522617e0b..a290e465e5 100644 --- 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); |