X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacdec_template.c;h=721511c5e953a1e8d0fcd2d019ac255c75841a1b;hb=80155795bb433fe588a957be9fb96a0a2608a00f;hp=b60b31a92c33e3bec03ea216ba71bb182e9322fa;hpb=22219a3ac46ac18f797c94e4619a34728556786c;p=ffmpeg diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index b60b31a92c3..721511c5e95 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -1927,7 +1927,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], if (cbt_m1 < NOISE_BT - 1) { for (group = 0; group < (int)g_len; group++, cfo+=128) { ac->vector_pow43(cfo, off_len); - ac->subband_scale(cfo, cfo, sf[idx], 34, off_len); + ac->subband_scale(cfo, cfo, sf[idx], 34, off_len, ac->avctx); } } } @@ -2158,7 +2158,7 @@ static void apply_intensity_stereo(AACContext *ac, coef0 + group * 128 + offsets[i], scale, 23, - offsets[i + 1] - offsets[i]); + offsets[i + 1] - offsets[i] ,ac->avctx); #else ac->fdsp->vector_fmul_scalar(coef1 + group * 128 + offsets[i], coef0 + group * 128 + offsets[i], @@ -3161,12 +3161,15 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, if (elem_type < TYPE_DSE) { if (che_presence[elem_type][elem_id]) { - av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d duplicate\n", + int error = che_presence[elem_type][elem_id] > 1; + av_log(ac->avctx, error ? AV_LOG_ERROR : AV_LOG_DEBUG, "channel element %d.%d duplicate\n", elem_type, elem_id); - err = AVERROR_INVALIDDATA; - goto fail; + if (error) { + err = AVERROR_INVALIDDATA; + goto fail; + } } - che_presence[elem_type][elem_id] = 1; + che_presence[elem_type][elem_id]++; if (!(che=get_che(ac, elem_type, elem_id))) { av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",