[FFmpeg-cvslog] avcodec/motionpixels: use av_fast_padded_malloc()

Paul B Mahol git at videolan.org
Wed Oct 30 12:41:50 CET 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Oct 30 08:51:01 2013 +0000| [62ef736f5a01555f5721f550e8d0119a12254099] | committer: Paul B Mahol

avcodec/motionpixels: use av_fast_padded_malloc()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62ef736f5a01555f5721f550e8d0119a12254099
---

 libavcodec/motionpixels.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index f8aa08b..470b1dc 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -275,13 +275,12 @@ static int mp_decode_frame(AVCodecContext *avctx,
         return ret;
 
     /* le32 bitstream msb first */
-    av_fast_malloc(&mp->bswapbuf, &mp->bswapbuf_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
+    av_fast_padded_malloc(&mp->bswapbuf, &mp->bswapbuf_size, buf_size);
     if (!mp->bswapbuf)
         return AVERROR(ENOMEM);
     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);



More information about the ffmpeg-cvslog mailing list