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

Commit 305a12e4 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "libstagefright: Reset AMR decoder on input port flush" into mnc-dev

parents 187b78c3 2dcec6ae
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -428,7 +428,15 @@ void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) {
    }
}

void SoftAMR::onPortFlushCompleted(OMX_U32 /* portIndex */) {
void SoftAMR::onPortFlushCompleted(OMX_U32 portIndex) {
    ALOGV("onPortFlushCompleted portindex %d, resetting frame ", portIndex);
    if (portIndex == 0) {
        if (mMode == MODE_NARROW) {
           Speech_Decode_Frame_reset(mState);
        } else {
           pvDecoder_AmrWb_Reset(mState, 0 /* reset_all */);
        }
    }
}

void SoftAMR::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {