Module: libav
Branch: master
Commit: 42060c703011d742661c3f5df66b6f30358acd96

Author:    Janne Grunau <[email protected]>
Committer: Janne Grunau <[email protected]>
Date:      Sun Dec  2 22:09:36 2012 +0100

eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()

---

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

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);

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to