Commit a4998e44 authored by Justin Ruggles's avatar Justin Ruggles

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.
parent 08e5cd38
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment