Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 143a951f authored by Robert Shih's avatar Robert Shih Committed by Lajos Molnar
Browse files

SoftAAC2: allow reconfiguring output after multiple output buffers

Bug: 17134697
Change-Id: Iaa8bdccbf1a8ccd3f898e48cfd22a0a443710fdd
parent fa1fc708
Loading
Loading
Loading
Loading
+1 −10
Original line number Original line Diff line number Diff line
@@ -720,16 +720,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 portIndex) {
                 * Thus, we could not say for sure whether a stream is
                 * Thus, we could not say for sure whether a stream is
                 * AAC+/eAAC+ until the first data frame is decoded.
                 * AAC+/eAAC+ until the first data frame is decoded.
                 */
                 */
                if (mOutputBufferCount > 1) {
                if (mInputBufferCount <= 2 || mOutputBufferCount > 1) { // TODO: <= 1
                    if (mStreamInfo->sampleRate != prevSampleRate ||
                        mStreamInfo->numChannels != prevNumChannels) {
                        ALOGE("can not reconfigure AAC output");
                        mSignalledError = true;
                        notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL);
                        return;
                    }
                }
                if (mInputBufferCount <= 2) { // TODO: <= 1
                    if (mStreamInfo->sampleRate != prevSampleRate ||
                    if (mStreamInfo->sampleRate != prevSampleRate ||
                        mStreamInfo->numChannels != prevNumChannels) {
                        mStreamInfo->numChannels != prevNumChannels) {
                        ALOGI("Reconfiguring decoder: %d->%d Hz, %d->%d channels",
                        ALOGI("Reconfiguring decoder: %d->%d Hz, %d->%d channels",