# HG changeset patch # User alexc # Date 1235866985 0 # Node ID 0e2f21d65473253d9bb63d4cf7989170cc045767 # Parent d1238ea3db6f1efc52c2cda735b88fbfd940a7e6 AAC: Make the CPE function more consistent with the functions for other channel elements. diff -r d1238ea3db6f -r 0e2f21d65473 aac.c --- 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: