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

Commit 94b66227 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix Vorbis decoder reset

b/8543366

Change-Id: I9f32e96fdfc355cf444259a7c40554e2de184728
parent f4c873a6
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -411,8 +411,19 @@ void SoftVorbis::onPortFlushCompleted(OMX_U32 portIndex) {
}

void SoftVorbis::onReset() {
    mInputBufferCount = 0;
    mNumFramesOutput = 0;
    vorbis_dsp_restart(mState);
    if (mState != NULL) {
        vorbis_dsp_clear(mState);
        delete mState;
        mState = NULL;
    }

    if (mVi != NULL) {
        vorbis_info_clear(mVi);
        delete mVi;
        mVi = NULL;
    }
}

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