From a63897ce4e4f244bb7c5b4916574152b2d0c1db7 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Wed, 10 Jul 2013 17:14:34 +0300 Subject: Check the right element in isBook This makes sure we read the right array element, corresponding to all other array accesses in the same function, and all other use of the isBook array elsewhere in the library. This makes the fix in the previous commit ("Avoid too big changes in isScale") work as intended, fixing other samples that triggered assertions. --- libAACenc/src/line_pe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libAACenc/src/line_pe.cpp b/libAACenc/src/line_pe.cpp index 7014bcb..ba7a25d 100644 --- a/libAACenc/src/line_pe.cpp +++ b/libAACenc/src/line_pe.cpp @@ -184,7 +184,7 @@ void FDKaacEnc_calcSfbPe(PE_CHANNEL_DATA *RESTRICT peChanData, } peChanData->sfbNActiveLines[sfbGrp+sfb] = nLines; } - else if( isBook[sfb] ) { + else if( isBook[sfbGrp+sfb] ) { /* provide for cost of scale factor for Intensity */ INT delta = isScale[sfbGrp+sfb] - lastValIs; lastValIs = isScale[sfbGrp+sfb]; -- cgit v1.2.3