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

Commit 49d62d66 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android Git Automerger
Browse files

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

* commit '877c673c':
  ACodec: fix flush/resume for decoder-output-meta-data mode
parents 8a220740 877c673c
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();
    }
}