diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-29 11:34:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-29 11:34:07 +0200 |
commit | 5f312139dff4072c3482a0b01daafcc1446d70c8 (patch) | |
tree | 8209d82a04b408e2d7a77a6588239b87948a2bec /libavcodec/flacdec.c | |
parent | 03853b1091e4a60c772677aa885e3d7e0ff19a12 (diff) | |
parent | 45ee556d51ef04d79d52bf6b0b7f28a4d231cb0c (diff) | |
download | ffmpeg-5f312139dff4072c3482a0b01daafcc1446d70c8.tar.gz |
Merge commit '45ee556d51ef04d79d52bf6b0b7f28a4d231cb0c'
* commit '45ee556d51ef04d79d52bf6b0b7f28a4d231cb0c':
qdm2: Whitespace cosmetics
flac: use meaningful return values
Conflicts:
libavcodec/flacdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r-- | libavcodec/flacdec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index c5847e3cfc..c8301a586e 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -409,9 +409,9 @@ static int decode_frame(FLACContext *s) GetBitContext *gb = &s->gb; FLACFrameInfo fi; - if (ff_flac_decode_frame_header(s->avctx, gb, &fi, 0)) { + if ((ret = ff_flac_decode_frame_header(s->avctx, gb, &fi, 0)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "invalid frame header\n"); - return AVERROR_INVALIDDATA; + return ret; } if (s->channels && fi.channels != s->channels && s->got_streaminfo) { @@ -435,7 +435,7 @@ static int decode_frame(FLACContext *s) } else if (s->bps && fi.bps != s->bps) { av_log(s->avctx, AV_LOG_ERROR, "switching bps mid-stream is not " "supported\n"); - return -1; + return AVERROR_INVALIDDATA; } if (!s->bps) { @@ -523,9 +523,9 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data, /* check for inline header */ if (AV_RB32(buf) == MKBETAG('f','L','a','C')) { - if (!s->got_streaminfo && parse_streaminfo(s, buf, buf_size)) { + if (!s->got_streaminfo && (ret = parse_streaminfo(s, buf, buf_size))) { av_log(s->avctx, AV_LOG_ERROR, "invalid header\n"); - return AVERROR_INVALIDDATA; + return ret; } return get_metadata_size(buf, buf_size); } |