You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lclenc: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata
Also check return value. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -137,7 +137,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
av_assert0(avctx->width && avctx->height);
|
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;
|
avctx->coded_frame= &c->pic;
|
||||||
|
|
||||||
c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
|
c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
|
||||||
|
Reference in New Issue
Block a user