summaryrefslogtreecommitdiff
path: root/libavformat/oggparseflac.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/oggparseflac.c')
-rw-r--r--libavformat/oggparseflac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c
index b5f1416a3c..a51ff251ad 100644
--- a/libavformat/oggparseflac.c
+++ b/libavformat/oggparseflac.c
@@ -34,7 +34,7 @@ flac_header (AVFormatContext * s, int idx)
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
GetBitContext gb;
- int mdt;
+ int mdt, ret;
if (os->buf[os->pstart] == 0xff)
return 0;
@@ -61,8 +61,8 @@ flac_header (AVFormatContext * s, int idx)
st->codecpar->codec_id = AV_CODEC_ID_FLAC;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
- if (ff_alloc_extradata(st->codecpar, FLAC_STREAMINFO_SIZE) < 0)
- return AVERROR(ENOMEM);
+ if ((ret = ff_alloc_extradata(st->codecpar, FLAC_STREAMINFO_SIZE)) < 0)
+ return ret;
memcpy(st->codecpar->extradata, streaminfo_start, st->codecpar->extradata_size);
samplerate = AV_RB24(st->codecpar->extradata + 10) >> 4;