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

Commit 08fce45f authored by Marco Nelissen's avatar Marco Nelissen Committed by Glenn Kasten
Browse files

Fix aac decoder flush

b/8543366

Change-Id: I746ffed6289486b802a2292bfc492ea6c780ed0b
parent c71a9913
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -567,6 +567,12 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) {
        // depend on fragments from the last one decoded.
        // drain all existing data
        drainDecoder();
        // force decoder loop to drop the first decoded buffer by resetting these state variables,
        // but only if initialization has already happened.
        if (mInputBufferCount != 0) {
            mInputBufferCount = 1;
            mStreamInfo->sampleRate = 0;
        }
    }
}