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

Commit b3f8b3a6 authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

Merge "vorbisdec: fix flush" am: 48f69816

am: 0932e7d1

Change-Id: I3bd1e4454cff1a1a51b1feea2b1eca75eddd0be9
parents 66010c27 0932e7d1
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line 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
        // Make sure that the next buffer output does not still
        // depend on fragments from the last one decoded.
        // depend on fragments from the last one decoded.


        mInputBufferCount = 0;
        mNumFramesOutput = 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;
        mSawInputEos = false;
        mSignalledOutputEos = false;
        mSignalledOutputEos = false;
        mNumFramesLeftOnPage = -1;
        mNumFramesLeftOnPage = -1;
        vorbis_dsp_restart(mState);
    }
    }
}
}