vc1test: Check malloc call

Signed-off-by: Diego Biurrun <diego@biurrun.de>
pull/76/merge
Nidhi Makhijani 11 years ago committed by Diego Biurrun
parent 77fc7b7672
commit 02a7a5e330
  1. 2
      libavformat/vc1test.c

@ -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);

Loading…
Cancel
Save