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

Commit 02bb0e4e authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Fix the software AAC decoder's AAC+ detection to ignore malformed frames"

parents 42a2b4cd f77493e6
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -316,7 +316,7 @@ void SoftAAC::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 (mInputBufferCount <= 2) {
        if (decoderErr == MP4AUDEC_SUCCESS && mInputBufferCount <= 2) {
            LOGV("audio/extended audio object type: %d + %d",
            LOGV("audio/extended audio object type: %d + %d",
                mConfig->audioObjectType, mConfig->extendedAudioObjectType);
                mConfig->audioObjectType, mConfig->extendedAudioObjectType);
            LOGV("aac+ upsampling factor: %d desired channels: %d",
            LOGV("aac+ upsampling factor: %d desired channels: %d",
@@ -410,9 +410,11 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
        notifyFillBufferDone(outHeader);
        notifyFillBufferDone(outHeader);
        outHeader = NULL;
        outHeader = NULL;


        if (decoderErr == MP4AUDEC_SUCCESS) {
            ++mInputBufferCount;
            ++mInputBufferCount;
        }
        }
    }
    }
}


void SoftAAC::onPortFlushCompleted(OMX_U32 portIndex) {
void SoftAAC::onPortFlushCompleted(OMX_U32 portIndex) {
    if (portIndex == 0) {
    if (portIndex == 0) {