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

Commit e6b1c536 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "CCodecBufferChannel: make sure the output buffers are reported in...

Merge "CCodecBufferChannel: make sure the output buffers are reported in order" into udc-dev am: 6037baff am: 3bc5deff

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



Change-Id: Id599f457dba766e8db1a952eb28cbc0bd99c5644
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 15133dca 3bc5deff
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2111,7 +2111,10 @@ bool CCodecBufferChannel::handleWork(
            outBuffer->meta()->setInt32("flags", BUFFER_FLAG_CODEC_CONFIG);
            ALOGV("[%s] onWorkDone: csd index = %zu [%p]", mName, index, outBuffer.get());

            output.unlock();
            // TRICKY: we want popped buffers reported in order, so sending
            // the callback while holding the lock here. This assumes that
            // onOutputBufferAvailable() does not block. onOutputBufferAvailable()
            // callbacks are always sent with the Output lock held.
            mCallback->onOutputBufferAvailable(index, outBuffer);
        } else {
            ALOGD("[%s] onWorkDone: unable to register csd", mName);
@@ -2201,7 +2204,10 @@ void CCodecBufferChannel::sendOutputBuffers() {
        case OutputBuffers::DISCARD:
            break;
        case OutputBuffers::NOTIFY_CLIENT:
            output.unlock();
            // TRICKY: we want popped buffers reported in order, so sending
            // the callback while holding the lock here. This assumes that
            // onOutputBufferAvailable() does not block. onOutputBufferAvailable()
            // callbacks are always sent with the Output lock held.
            mCallback->onOutputBufferAvailable(index, outBuffer);
            break;
        case OutputBuffers::REALLOCATE: