[FFmpeg-devel] [PATCH 3/8] Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer used in motion pixels decoder.

Michael Niedermayer michaelni at gmx.at
Fri Sep 30 01:31:10 CEST 2011


On Fri, Sep 30, 2011 at 12:05:48AM +0200, fenrir at elivagar.org wrote:
> From: Laurent Aimar <fenrir at videolan.org>
> 
> ---
>  libavcodec/motionpixels.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
> index 165a3d1..01d3c20 100644
> --- a/libavcodec/motionpixels.c
> +++ b/libavcodec/motionpixels.c
> @@ -253,6 +253,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);

This also needs
--- ./tests/ref/fate/motionpixels  2011-04-01 20:39:55.000000000 +0200
+++ tests/data/fate/motionpixels    2011-09-30 01:26:49.000000000 +0200
@@ -109,4 +109,4 @@
 0, 648003, 230400, 0xb343f372
 0, 654003, 230400, 0xf7f1e588
 0, 660003, 230400, 0x9682bdb2
-0, 666003, 230400, 0x538a3db8
+0, 666003, 230400, 0x16f9aad8
make: *** [fate-motionpixels] Error 1

ive already added that to the patch, will be part of the commit that
ill push soon

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110930/df7777fa/attachment.asc>


More information about the ffmpeg-devel mailing list