media/libstagefright/codecs/aacenc/AACEncoder.cpp
100644 → 100755
+1
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
In AACEncoder.cpp, the "Check" functionality is used to check whether the No. of Samples for the output is not zero. In case of 1 channel recording, the No. of Samples per frame is 1024 and the acceptable limit is 1024 for AAC rendition. So, no problem occurs. But in case of 2 channels, No. of Samples = 1024 * 2 = 2048. While the acceptable limit is 2048, the encoder gets 1024 samples per frame and hence waits for another 1024 samples. In the mean time, it sends outputData.Length = 0 and hence there is a crash issue. If the check condition is commented, there is no further problem and encoding can be done smoothly. This change does not break any other functionality. bug 795379, bug 781177 Change-Id: If11d469f261dc5f817d2e6f1b780cf873711cde6