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

Commit 54865b74 authored by Wonsik Kim's avatar Wonsik Kim Committed by Automerger Merge Worker
Browse files

Merge "CCodecBufferChannel: decrease balance for discarded work as well" into...

Merge "CCodecBufferChannel: decrease balance for discarded work as well" into main am: 7843f5da am: b195c065

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/3276973



Change-Id: If63c2660527d41e636dc47e2f1d466585b700686
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 464b1e1f b195c065
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -2628,8 +2628,6 @@ void CCodecBufferChannel::sendOutputBuffers() {
        switch (action) {
        case OutputBuffers::SKIP:
            return;
        case OutputBuffers::DISCARD:
            break;
        case OutputBuffers::NOTIFY_CLIENT:
        {
            // TRICKY: we want popped buffers reported in order, so sending
@@ -2656,13 +2654,16 @@ void CCodecBufferChannel::sendOutputBuffers() {
                    outBuffer->meta()->setObject("accessUnitInfo", obj);
                }
            }
            mCallback->onOutputBufferAvailable(index, outBuffer);
            [[fallthrough]];
        }
        case OutputBuffers::DISCARD: {
            if (mHasInputSurface && android::media::codec::provider_->input_surface_throttle()) {
                Mutexed<InputSurface>::Locked inputSurface(mInputSurface);
                --inputSurface->numProcessingBuffersBalance;
                ALOGV("[%s] onOutputBufferAvailable: numProcessingBuffersBalance = %lld",
                ALOGV("[%s] onWorkDone: numProcessingBuffersBalance = %lld",
                        mName, static_cast<long long>(inputSurface->numProcessingBuffersBalance));
            }
            mCallback->onOutputBufferAvailable(index, outBuffer);
            break;
        }
        case OutputBuffers::REALLOCATE: