changeset 9074:0e2f21d65473 libavcodec

AAC: Make the CPE function more consistent with the functions for other channel elements.
author alexc
date Sun, 01 Mar 2009 00:23:05 +0000
parents d1238ea3db6f
children 6366106bd493
files aac.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/aac.c	Sat Feb 28 20:58:07 2009 +0000
+++ b/aac.c	Sun Mar 01 00:23:05 2009 +0000
@@ -1075,11 +1075,9 @@
  *
  * @return  Returns error status. 0 - OK, !0 - error
  */
-static int decode_cpe(AACContext * ac, GetBitContext * gb, int elem_id) {
+static int decode_cpe(AACContext * ac, GetBitContext * gb, ChannelElement * cpe) {
     int i, ret, common_window, ms_present = 0;
-    ChannelElement * cpe;
 
-    cpe = ac->che[TYPE_CPE][elem_id];
     common_window = get_bits1(gb);
     if (common_window) {
         if (decode_ics_info(ac, &cpe->ch[0].ics, gb, 1))
@@ -1595,7 +1593,7 @@
             break;
 
         case TYPE_CPE:
-            err = decode_cpe(ac, &gb, elem_id);
+            err = decode_cpe(ac, &gb, ac->che[TYPE_CPE][elem_id]);
             break;
 
         case TYPE_CCE: