[FFmpeg-cvslog] eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()

Janne Grunau git at videolan.org
Wed Dec 5 17:36:56 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Sun Dec  2 22:09:36 2012 +0100| [42060c703011d742661c3f5df66b6f30358acd96] | committer: Janne Grunau

eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()

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

 libavcodec/eamad.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 9f4d858..cf44ae9 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -264,7 +264,8 @@ static int decode_frame(AVCodecContext *avctx,
         }
     }
 
-    av_fast_malloc(&s->bitstream_buf, &s->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
+    av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size,
+                          buf_end - buf);
     if (!s->bitstream_buf)
         return AVERROR(ENOMEM);
     s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);



More information about the ffmpeg-cvslog mailing list