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

Commit 987087c3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Release buffers on MediaCodec#stop()" into rvc-dev

parents c78db377 fb128ba8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1406,6 +1406,9 @@ void CCodec::stop() {
        // TODO: convert err into status_t
        mCallback->onError(UNKNOWN_ERROR, ACTION_CODE_FATAL);
    }
    // Assure buffers are not owned when stop() was called without flush().
    std::list<std::unique_ptr<C2Work>> flushedWork;
    mChannel->flush(flushedWork);

    {
        Mutexed<std::unique_ptr<Config>>::Locked configLocked(mConfig);