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.
---
 libavcodec/imc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index da5d4e6..fb10a35 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));
-- 
1.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to