Browse code

motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer

Signed-off-by: Janne Grunau <janne-libav@jannau.net>

Laurent Aimar authored on 2011/09/30 08:13:35
Showing 2 changed files
... ...
@@ -252,6 +252,7 @@ static int mp_decode_frame(AVCodecContext *avctx,
252 252
     mp->dsp.bswap_buf((uint32_t *)mp->bswapbuf, (const uint32_t *)buf, buf_size / 4);
253 253
     if (buf_size & 3)
254 254
         memcpy(mp->bswapbuf + (buf_size & ~3), buf + (buf_size & ~3), buf_size & 3);
255
+    memset(mp->bswapbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
255 256
     init_get_bits(&gb, mp->bswapbuf, buf_size * 8);
256 257
 
257 258
     memset(mp->changes_map, 0, avctx->width * avctx->height);
... ...
@@ -109,4 +109,4 @@
109 109
 0, 648003, 230400, 0xb343f372
110 110
 0, 654003, 230400, 0xf7f1e588
111 111
 0, 660003, 230400, 0x9682bdb2
112
-0, 666003, 230400, 0x538a3db8
112
+0, 666003, 230400, 0x16f9aad8