vc1test: Check malloc call

Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
Nidhi Makhijani 2014-07-06 20:52:52 +05:30 committed by Diego Biurrun
parent 77fc7b7672
commit 02a7a5e330
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,8 @@ static int vc1t_read_header(AVFormatContext *s)
st->codec->codec_id = AV_CODEC_ID_WMV3;
st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
st->codec->extradata_size = VC1_EXTRADATA_SIZE;
avio_read(pb, st->codec->extradata, VC1_EXTRADATA_SIZE);
st->codec->height = avio_rl32(pb);