mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
bink demuxer: check malloc return value
This commit is contained in:
parent
f2960097e4
commit
1730ca2eca
1 changed files with 2 additions and 0 deletions
|
|
@ -116,6 +116,8 @@ static int read_header(AVFormatContext *s)
|
|||
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
vst->codec->codec_id = AV_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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue