[FFmpeg-cvslog] avcodec/ffv1enc: allocate padding for extradata

Michael Niedermayer git at videolan.org
Sun May 18 16:05:42 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 18 15:58:03 2014 +0200| [947ed8f292f5d007dcb589c36a751466b3480873] | committer: Michael Niedermayer

avcodec/ffv1enc: allocate padding for extradata

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1enc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index c7479e6..b63ed42 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -549,7 +549,7 @@ static int write_extradata(FFV1Context *f)
 
     f->avctx->extradata_size = 10000 + 4 +
                                     (11 * 11 * 5 * 5 * 5 + 11 * 11 * 11) * 32;
-    f->avctx->extradata = av_malloc(f->avctx->extradata_size);
+    f->avctx->extradata = av_malloc(f->avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
     if (!f->avctx->extradata)
         return AVERROR(ENOMEM);
     ff_init_range_encoder(c, f->avctx->extradata, f->avctx->extradata_size);



More information about the ffmpeg-cvslog mailing list