aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-29 23:13:35 +0000
committerReinhard Tartler <siretart@tauware.de>2012-03-18 17:50:31 +0100
commitf2f2a00d39a458e23c018744b9aacb3f94501d67 (patch)
tree728c02118bdb734fe614005058615a500da26e5e
parent905d0633a6e8f345bd6a0ae442d77cc03cf62c4b (diff)
downloadffmpeg-f2f2a00d39a458e23c018744b9aacb3f94501d67.tar.gz
motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer
Signed-off-by: Janne Grunau <janne-libav@jannau.net> (cherry picked from commit d337dd3a907110b32c6305bb65e4beca5b830c5d) Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/motionpixels.c1
-rw-r--r--tests/ref/fate/motionpixels2
2 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 54559350b8..91eb7f9017 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -252,6 +252,7 @@ static int mp_decode_frame(AVCodecContext *avctx,
mp->dsp.bswap_buf((uint32_t *)mp->bswapbuf, (const uint32_t *)buf, buf_size / 4);
if (buf_size & 3)
memcpy(mp->bswapbuf + (buf_size & ~3), buf + (buf_size & ~3), buf_size & 3);
+ memset(mp->bswapbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
init_get_bits(&gb, mp->bswapbuf, buf_size * 8);
memset(mp->changes_map, 0, avctx->width * avctx->height);
diff --git a/tests/ref/fate/motionpixels b/tests/ref/fate/motionpixels
index e588ed3e18..30651e92c6 100644
--- a/tests/ref/fate/motionpixels
+++ b/tests/ref/fate/motionpixels
@@ -109,4 +109,4 @@
0, 648003, 230400, 0xb343f372
0, 654003, 230400, 0xf7f1e588
0, 660003, 230400, 0x9682bdb2
-0, 666003, 230400, 0x538a3db8
+0, 666003, 230400, 0x16f9aad8