aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-10-30 08:51:01 +0000
committerPaul B Mahol <onemda@gmail.com>2013-10-30 11:04:05 +0000
commit62ef736f5a01555f5721f550e8d0119a12254099 (patch)
tree4e9700515ee6ab1f58f1b00221058836be500a6b
parent7fd7a10efde79098b7ea48aaf92a6be4c6d67f82 (diff)
downloadffmpeg-62ef736f5a01555f5721f550e8d0119a12254099.tar.gz
avcodec/motionpixels: use av_fast_padded_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/motionpixels.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index f8aa08bcb6..470b1dc64d 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);