summaryrefslogtreecommitdiff
path: root/libavformat/westwood_vqa.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/westwood_vqa.c')
-rw-r--r--libavformat/westwood_vqa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index c21a3e31f6..a0db854b1c 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -85,7 +85,7 @@ static int wsvqa_read_header(AVFormatContext *s)
uint8_t scratch[VQA_PREAMBLE_SIZE];
uint32_t chunk_tag;
uint32_t chunk_size;
- int fps;
+ int fps, ret;
/* initialize the video decoder stream */
st = avformat_new_stream(s, NULL);
@@ -101,8 +101,8 @@ static int wsvqa_read_header(AVFormatContext *s)
avio_seek(pb, 20, SEEK_SET);
/* the VQA header needs to go to the decoder */
- if (ff_get_extradata(s, st->codecpar, pb, VQA_HEADER_SIZE) < 0)
- return AVERROR(ENOMEM);
+ if ((ret = ff_get_extradata(s, st->codecpar, pb, VQA_HEADER_SIZE)) < 0)
+ return ret;
header = st->codecpar->extradata;
st->codecpar->width = AV_RL16(&header[6]);
st->codecpar->height = AV_RL16(&header[8]);
@@ -214,8 +214,8 @@ static int wsvqa_read_packet(AVFormatContext *s,
break;
case SND2_TAG:
st->codecpar->codec_id = AV_CODEC_ID_ADPCM_IMA_WS;
- if (ff_alloc_extradata(st->codecpar, 2))
- return AVERROR(ENOMEM);
+ if ((ret = ff_alloc_extradata(st->codecpar, 2)) < 0)
+ return ret;
AV_WL16(st->codecpar->extradata, wsvqa->version);
break;
}