summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2010-05-21 18:27:16 +0000
committerReinhard Tartler <siretart@tauware.de>2010-05-21 18:27:16 +0000
commitb12045c8c7676ba5cced050be2f7df60f1efc88a (patch)
treee87423ed435c5942eb31d93f6ea99ab441a90ca1 /libavcodec
parenta70e7cc928186da2a23e69225c340a8d9972525d (diff)
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. backport r23094 by alexc Originally committed as revision 23218 to svn://svn.ffmpeg.org/ffmpeg/branches/0.6
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 72e93a40c8..938df344bb 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -561,6 +561,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
chans = tag == TYPE_CPE ? 2 : 1;
cpe = &s->cpe[i];
for (j = 0; j < chans; j++) {
+ s->cur_channel = start_ch + j;
s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda);
}
cpe->common_window = 0;
@@ -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)
s->coder->search_for_ms(s, cpe, s->lambda);
adjust_frame_information(s, cpe, chans);