[FFmpeg-cvslog] libx264: Make sure the extradata are padded

Luca Barbato git at videolan.org
Tue Oct 27 12:49:21 CET 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Oct 20 21:12:30 2015 +0200| [1ec72c6c68dbc78bf4ebb6f06c13316dc488bdfa] | committer: Luca Barbato

libx264: Make sure the extradata are padded

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

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

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index b9ec150..bcbdf84 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -589,7 +589,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
         int nnal, s, i;
 
         s = x264_encoder_headers(x4->enc, &nal, &nnal);
-        avctx->extradata = p = av_malloc(s);
+        avctx->extradata = p = av_mallocz(s + AV_INPUT_BUFFER_PADDING_SIZE);
         if (!p)
             return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list