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

Commit 0dca30c6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Release buffers on MediaCodec#stop()" into rvc-dev am: 987087c3

Change-Id: Ie4c621e4a476fa4995eea5e62157ee7b2c266263
parents ab878811 987087c3
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);