diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-03 23:39:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-03 23:39:11 +0100 |
commit | 6567c59c4903194eeaf822aeb88b7b8dbda1354b (patch) | |
tree | 73728b93ca4513ca0b8bf824d21b1b3f8cdad2e2 /libavcodec/flacdec.c | |
parent | 020d53ebdb581ea5a493239537cb0f5cc54809e9 (diff) | |
download | ffmpeg-6567c59c4903194eeaf822aeb88b7b8dbda1354b.tar.gz |
avcodec/flac: forward errors from ff_flac_parse_streaminfo()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r-- | libavcodec/flacdec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 5f5802c97f..d1beb4e15e 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -109,7 +109,9 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; /* initialize based on the demuxer-supplied streamdata header */ - ff_flac_parse_streaminfo(avctx, &s->flac_stream_info, streaminfo); + ret = ff_flac_parse_streaminfo(avctx, &s->flac_stream_info, streaminfo); + if (ret < 0) + return ret; ret = allocate_buffers(s); if (ret < 0) return ret; @@ -175,7 +177,9 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size) metadata_size != FLAC_STREAMINFO_SIZE) { return AVERROR_INVALIDDATA; } - ff_flac_parse_streaminfo(s->avctx, &s->flac_stream_info, &buf[8]); + ret = ff_flac_parse_streaminfo(s->avctx, &s->flac_stream_info, &buf[8]); + if (ret < 0) + return ret; ret = allocate_buffers(s); if (ret < 0) return ret; |