summaryrefslogtreecommitdiff
path: root/libavformat/westwood_vqa.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-25 16:37:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-25 17:38:30 +0100
commit239a0543a66b6b4a67ec5b96081cfa2ec5776da6 (patch)
tree065b632a4b75d1c7a1f5fb0dc625b45c3b818231 /libavformat/westwood_vqa.c
parent6fb29535fd540a043aec5a20146ee8df7648b923 (diff)
avformat/westwood_vqa: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/westwood_vqa.c')
-rw-r--r--libavformat/westwood_vqa.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index 1d4bb5ad6c..2a988ad390 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -101,13 +101,9 @@ static int wsvqa_read_header(AVFormatContext *s)
avio_seek(pb, 20, SEEK_SET);
/* the VQA header needs to go to the decoder */
- if (ff_alloc_extradata(st->codec, VQA_HEADER_SIZE))
+ if (ff_get_extradata(st->codec, pb, VQA_HEADER_SIZE) < 0)
return AVERROR(ENOMEM);
header = (uint8_t *)st->codec->extradata;
- if (avio_read(pb, st->codec->extradata, VQA_HEADER_SIZE) !=
- VQA_HEADER_SIZE) {
- return AVERROR(EIO);
- }
st->codec->width = AV_RL16(&header[6]);
st->codec->height = AV_RL16(&header[8]);
fps = header[12];