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

Commit 8739bc7c authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by android-build-merger
Browse files

Merge "SoftAAC2: Modified conditions for format change notification after...

Merge "SoftAAC2: Modified conditions for format change notification after decoding each frame." into nyc-dev
am: 6d40663b

* commit '6d40663b':
  SoftAAC2: Modified conditions for format change notification after decoding each frame.

Change-Id: If90c85c44f5725d9d64da1bed712f68999aa86d4
parents 124c0903 6d40663b
Loading
Loading
Loading
Loading
+27 −27
Original line number Diff line number Diff line
@@ -767,9 +767,15 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) {
                 * Thus, we could not say for sure whether a stream is
                 * AAC+/eAAC+ until the first data frame is decoded.
                 */
                if (mInputBufferCount <= 2 || mOutputBufferCount > 1) { // TODO: <= 1
                    if (mStreamInfo->sampleRate != prevSampleRate ||
                        mStreamInfo->numChannels != prevNumChannels) {
                if (!mStreamInfo->sampleRate || !mStreamInfo->numChannels) {
                    if ((mInputBufferCount > 2) && (mOutputBufferCount <= 1)) {
                        ALOGW("Invalid AAC stream");
                        mSignalledError = true;
                        notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL);
                        return;
                    }
                } else if ((mStreamInfo->sampleRate != prevSampleRate) ||
                           (mStreamInfo->numChannels != prevNumChannels)) {
                    ALOGI("Reconfiguring decoder: %d->%d Hz, %d->%d channels",
                          prevSampleRate, mStreamInfo->sampleRate,
                          prevNumChannels, mStreamInfo->numChannels);
@@ -788,12 +794,6 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) {
                    }
                    return;
                }
                } else if (!mStreamInfo->sampleRate || !mStreamInfo->numChannels) {
                    ALOGW("Invalid AAC stream");
                    mSignalledError = true;
                    notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL);
                    return;
                }
                if (inHeader && inHeader->nFilledLen == 0) {
                    inInfo->mOwnedByUs = false;
                    mInputBufferCount++;