diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-29 11:16:01 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-11-02 17:02:22 -0400 |
commit | a4998e448f517a825fdc87e95e6c103223480867 (patch) | |
tree | 7f241c8326d7ce27d8e39d60f7c7b63d281eecad /libavcodec/imc.c | |
parent | 08e5cd3810a563ed2cfee4fd6384d9a516b63fa3 (diff) | |
download | ffmpeg-a4998e448f517a825fdc87e95e6c103223480867.tar.gz |
imc: return error codes instead of 0 for error conditions.
This fixes a bug where the whole buffer was returned as decoded audio due to
*data_size not being set to zero and the return value being >= 0.
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r-- | libavcodec/imc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c index daa28576b0..1f1db6c121 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -810,13 +810,13 @@ static int imc_decode_frame(AVCodecContext * avctx, if(imc_get_coeffs(q) < 0) { av_log(avctx, AV_LOG_ERROR, "Read coefficients failed\n"); q->decoder_reset = 1; - return 0; + return AVERROR_INVALIDDATA; } if(inverse_quant_coeff(q, stream_format_code) < 0) { av_log(avctx, AV_LOG_ERROR, "Inverse quantization of coefficients failed\n"); q->decoder_reset = 1; - return 0; + return AVERROR_INVALIDDATA; } memset(q->skipFlags, 0, sizeof(q->skipFlags)); |