Commit 495af353 authored by Alex Converse's avatar Alex Converse

Set cur_channel in the AAC encoder context where needed.

Most coder functions read it. Carting this around in the context may be
suboptimal; a refactor should be considered.

Originally committed as revision 23094 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2c2b2c0a
...@@ -561,6 +561,7 @@ static int aac_encode_frame(AVCodecContext *avctx, ...@@ -561,6 +561,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
chans = tag == TYPE_CPE ? 2 : 1; chans = tag == TYPE_CPE ? 2 : 1;
cpe = &s->cpe[i]; cpe = &s->cpe[i];
for (j = 0; j < chans; j++) { for (j = 0; j < chans; j++) {
s->cur_channel = start_ch + j;
s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda); s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda);
} }
cpe->common_window = 0; cpe->common_window = 0;
...@@ -576,6 +577,7 @@ static int aac_encode_frame(AVCodecContext *avctx, ...@@ -576,6 +577,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
} }
} }
} }
s->cur_channel = start_ch;
if (cpe->common_window && s->coder->search_for_ms) if (cpe->common_window && s->coder->search_for_ms)
s->coder->search_for_ms(s, cpe, s->lambda); s->coder->search_for_ms(s, cpe, s->lambda);
adjust_frame_information(s, cpe, chans); adjust_frame_information(s, cpe, chans);
......
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