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

Commit 3cb57616 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: use all input buffers in ACodec

Bug: 15699665
Change-Id: If37e5c70e56821375ede911e781b5d4b8d41f8ad
parent c9a11abb
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -4506,11 +4506,14 @@ void ACodec::ExecutingState::resume() {

    submitOutputBuffers();

    // Post the first input buffer.
    // Post all available input buffers
    CHECK_GT(mCodec->mBuffers[kPortIndexInput].size(), 0u);
    BufferInfo *info = &mCodec->mBuffers[kPortIndexInput].editItemAt(0);

    for (size_t i = 0; i < mCodec->mBuffers[kPortIndexInput].size(); i++) {
        BufferInfo *info = &mCodec->mBuffers[kPortIndexInput].editItemAt(i);
        if (info->mStatus == BufferInfo::OWNED_BY_US) {
            postFillThisBuffer(info);
        }
    }

    mActive = true;
}