changeset 11706:15e7486e5c7a libavcodec

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.
author alexc
date Tue, 11 May 2010 18:53:49 +0000
parents a66b535972b7
children eb9e142ea51f
files aacenc.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aacenc.c	Tue May 11 14:49:48 2010 +0000
+++ b/aacenc.c	Tue May 11 18:53:49 2010 +0000
@@ -561,6 +561,7 @@
             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 @@
                     }
                 }
             }
+            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);