diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 80dd3d80e6a7a1bc16af39ee0a3273ea2f6ea1f7..362f02b1155cc1c0687e52e14e01d4b0208f616d 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -593,7 +593,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, coeffs[ch] = cpe->ch[ch].coeffs; s->psy.model->analyze(&s->psy, start_ch, coeffs, wi); for (ch = 0; ch < chans; ch++) { - s->cur_channel = start_ch * 2 + ch; + s->cur_channel = start_ch + ch; s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda); } cpe->common_window = 0; @@ -609,7 +609,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } } } - s->cur_channel = start_ch * 2; + s->cur_channel = start_ch; if (s->options.stereo_mode && cpe->common_window) { if (s->options.stereo_mode > 0) { IndividualChannelStream *ics = &cpe->ch[0].ics;