summaryrefslogtreecommitdiff
path: root/libavformat/apc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/apc.c')
-rw-r--r--libavformat/apc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/apc.c b/libavformat/apc.c
index 571726affb..7210bfbb56 100644
--- a/libavformat/apc.c
+++ b/libavformat/apc.c
@@ -37,6 +37,7 @@ static int apc_read_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
AVStream *st;
+ int ret;
avio_rl32(pb); /* CRYO */
avio_rl32(pb); /* _APC */
@@ -53,8 +54,8 @@ static int apc_read_header(AVFormatContext *s)
st->codecpar->sample_rate = avio_rl32(pb);
/* initial predictor values for adpcm decoder */
- if (ff_get_extradata(s, st->codecpar, pb, 2 * 4) < 0)
- return AVERROR(ENOMEM);
+ if ((ret = ff_get_extradata(s, st->codecpar, pb, 2 * 4)) < 0)
+ return ret;
if (avio_rl32(pb)) {
st->codecpar->channels = 2;