[FFmpeg-cvslog] lclenc: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata
Paul B Mahol
git at videolan.org
Sat Jul 27 14:05:35 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul 26 21:50:28 2013 +0000| [6dbcecd78e022493866fe39e30743284acc550b3] | committer: Paul B Mahol
lclenc: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata
Also check return value.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dbcecd78e022493866fe39e30743284acc550b3
---
libavcodec/lclenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index cbfd8fe..263e66b 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -137,7 +137,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
av_assert0(avctx->width && avctx->height);
- avctx->extradata= av_mallocz(8);
+ avctx->extradata = av_mallocz(8 + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!avctx->extradata)
+ return AVERROR(ENOMEM);
avctx->coded_frame= &c->pic;
c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
More information about the ffmpeg-cvslog
mailing list