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

Commit 877c673c authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "ACodec: fix flush/resume for decoder-output-meta-data mode" into klp-dev

parents dc33c542 c38fcfba
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2366,6 +2366,10 @@ void ACodec::waitUntilAllPossibleNativeWindowBuffersAreReturnedToUs() {

    while (countBuffersOwnedByNativeWindow() > (size_t)minUndequeuedBufs
            && dequeueBufferFromNativeWindow() != NULL) {
        // these buffers will be submitted as regular buffers; account for this
        if (mStoreMetaDataInOutputBuffers && mMetaDataBuffersToSubmit > 0) {
            --mMetaDataBuffersToSubmit;
        }
    }
}

@@ -4000,10 +4004,9 @@ void ACodec::ExecutingState::submitRegularOutputBuffers() {
}

void ACodec::ExecutingState::submitOutputBuffers() {
    submitRegularOutputBuffers();
    if (mCodec->mStoreMetaDataInOutputBuffers) {
        submitOutputMetaBuffers();
    } else {
        submitRegularOutputBuffers();
    }
}