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

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

Merge "Fix cannot play issue after seeking for Vorbis Playback." am: 3e0608b6

am: 3258fc04

Change-Id: Idb7101ea79b9d977fab3d0bcade773b50b7faad9
parents 8fa810a4 3258fc04
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -572,18 +572,19 @@ void SoftVorbis::onQueueFilled(OMX_U32 /* portIndex */) {
}

void SoftVorbis::onPortFlushCompleted(OMX_U32 portIndex) {
    if (portIndex == 0 && mState != NULL) {
        // Make sure that the next buffer output does not still
        // depend on fragments from the last one decoded.

    if (portIndex == 0) {
        mInputBufferCount = 0;
        mNumFramesOutput = 0;
        mSawInputEos = false;
        mSignalledOutputEos = false;
        mNumFramesLeftOnPage = -1;
        if (mState != NULL) {
            // Make sure that the next buffer output does not still
            // depend on fragments from the last one decoded.
            vorbis_dsp_restart(mState);
        }
    }
}

void SoftVorbis::onReset() {
    mInputBufferCount = 0;
@@ -603,6 +604,7 @@ void SoftVorbis::onReset() {
    mSawInputEos = false;
    mSignalledOutputEos = false;
    mSignalledError = false;
    mNumFramesLeftOnPage = -1;
    mOutputPortSettingsChange = NONE;
}