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

Commit c2d8d748 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "C2SoftAacDec: Fix reset while codec's stop()" am: c426a76e

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1702506

Change-Id: Ic4d67403204bc5676dadc62e070d23476086baea
parents 25dd2ee9 c426a76e
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -289,13 +289,14 @@ c2_status_t C2SoftAacDec::onStop() {
    mOutputDelayRingBufferFilled = 0;
    mOutputDelayRingBufferFilled = 0;
    mBuffersInfo.clear();
    mBuffersInfo.clear();


    // To make the codec behave the same before and after a reset, we need to invalidate the
    status_t status = UNKNOWN_ERROR;
    // streaminfo struct. This does that:
    if (mAACDecoder) {
    mStreamInfo->sampleRate = 0; // TODO: mStreamInfo is read only
        aacDecoder_Close(mAACDecoder);

        status = initDecoder();
    }
    mSignalledError = false;
    mSignalledError = false;


    return C2_OK;
    return status == OK ? C2_OK : C2_CORRUPTED;
}
}


void C2SoftAacDec::onReset() {
void C2SoftAacDec::onReset() {