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

Commit 48f69816 authored by Wonsik Kim's avatar Wonsik Kim Committed by Gerrit Code Review
Browse files

Merge "vorbisdec: fix flush"

parents b49dc95b 2c36526a
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);
    }
}