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

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

Merge "MediaCodec: avoid codec EOS if flushing during port reconfiguration" into klp-dev

parents 19fffcbd a73c954d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -3066,16 +3066,17 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) {
    sp<ABuffer> buffer;
    int32_t err = OK;
    bool eos = false;
    PortMode mode = getPortMode(kPortIndexInput);

    if (!msg->findBuffer("buffer", &buffer)) {
        /* these are unfilled buffers returned by client */
        CHECK(msg->findInt32("err", &err));

        ALOGV("[%s] saw error %d instead of an input buffer",
             mCodec->mComponentName.c_str(), err);

        buffer.clear();

        eos = true;
        mode = KEEP_BUFFERS;
    }

    int32_t tmp;
@@ -3089,8 +3090,6 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) {

    info->mStatus = BufferInfo::OWNED_BY_US;

    PortMode mode = getPortMode(kPortIndexInput);

    switch (mode) {
        case KEEP_BUFFERS:
        {