aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-07-26 21:50:28 +0000
committerPaul B Mahol <onemda@gmail.com>2013-07-27 12:02:18 +0000
commit6dbcecd78e022493866fe39e30743284acc550b3 (patch)
treedc885143c7f9201e9e3a71e7c5d0f261df14672f
parent573018c61fadba5e469966acf0eeff0e5da2e913 (diff)
downloadffmpeg-6dbcecd78e022493866fe39e30743284acc550b3.tar.gz
lclenc: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata
Also check return value. Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/lclenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index cbfd8fe8a8..263e66bdd0 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 ?