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

Commit 2c36526a authored by Wonsik Kim's avatar Wonsik Kim
Browse files

vorbisdec: fix flush

Bug: 113983576
Test: CTS @Small tests
Change-Id: I35193bf1ffacbe6b7a4f9b2ad0ab6bb9eaf3cb82
parent b49dc95b
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -548,11 +548,21 @@ void SoftVorbis::onPortFlushCompleted(OMX_U32 portIndex) {
        // Make sure that the next buffer output does not still
        // depend on fragments from the last one decoded.

        mInputBufferCount = 0;
        mNumFramesOutput = 0;
        if (mState != NULL) {
            vorbis_dsp_clear(mState);
            delete mState;
            mState = NULL;
        }
        if (mVi != NULL) {
            vorbis_info_clear(mVi);
            delete mVi;
            mVi = NULL;
        }
        mSawInputEos = false;
        mSignalledOutputEos = false;
        mNumFramesLeftOnPage = -1;
        vorbis_dsp_restart(mState);
    }
}