summaryrefslogtreecommitdiff
path: root/libavformat/vc1test.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/vc1test.c')
-rw-r--r--libavformat/vc1test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 7c6bcde089..bf1bfe0318 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -61,8 +61,8 @@ static int vc1t_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = AV_CODEC_ID_WMV3;
- st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
- st->codec->extradata_size = VC1_EXTRADATA_SIZE;
+ if (ff_alloc_extradata(st->codec, VC1_EXTRADATA_SIZE))
+ return AVERROR(ENOMEM);
avio_read(pb, st->codec->extradata, VC1_EXTRADATA_SIZE);
st->codec->height = avio_rl32(pb);
st->codec->width = avio_rl32(pb);