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

Commit af9cd746 authored by Rakesh Kumar's avatar Rakesh Kumar Committed by Automerger Merge Worker
Browse files

C2SoftAacDec: Fix reset while codec's stop() am: 87604efc

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

Change-Id: I850c6d0cb7770a73fdb2c5e6170d8c514c36a9ab
parents 9b90e43d 87604efc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -289,13 +289,14 @@ c2_status_t C2SoftAacDec::onStop() {
    mOutputDelayRingBufferFilled = 0;
    mBuffersInfo.clear();

    // To make the codec behave the same before and after a reset, we need to invalidate the
    // streaminfo struct. This does that:
    mStreamInfo->sampleRate = 0; // TODO: mStreamInfo is read only

    status_t status = UNKNOWN_ERROR;
    if (mAACDecoder) {
        aacDecoder_Close(mAACDecoder);
        status = initDecoder();
    }
    mSignalledError = false;

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

void C2SoftAacDec::onReset() {