1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

bink: check av_mallocz() return value

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-06-09 10:57:14 +00:00
parent c2dd01c16f
commit e400b95b32

View File

@ -115,6 +115,8 @@ static int read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_BINKVIDEO;
vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!vst->codec->extradata)
return AVERROR(ENOMEM);
vst->codec->extradata_size = 4;
avio_read(pb, vst->codec->extradata, 4);