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

Commit 7fa01521 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

Restore NuPlayer error and EOS handling



This was erroneously removed by commit a73c954d

Change-Id: I4742339139e770f0181c99d427875897fd60b68e
Signed-off-by: default avatarLajos Molnar <lajos@google.com>
Bug: 11413439
parent c76b9f52
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -3072,11 +3072,16 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) {
        /* these are unfilled buffers returned by client */
        CHECK(msg->findInt32("err", &err));

        if (err == OK) {
            /* buffers with no errors are returned on MediaCodec.flush */
            mode = KEEP_BUFFERS;
        } else {
            ALOGV("[%s] saw error %d instead of an input buffer",
                 mCodec->mComponentName.c_str(), err);
            eos = true;
        }

        buffer.clear();
        mode = KEEP_BUFFERS;
    }

    int32_t tmp;
+2 −1
Original line number Diff line number Diff line
@@ -1500,7 +1500,8 @@ void MediaCodec::returnBuffersToCodecOnPort(int32_t portIndex) {
            info->mOwnedByClient = false;

            if (portIndex == kPortIndexInput) {
                msg->setInt32("err", ERROR_END_OF_STREAM);
                /* no error, just returning buffers */
                msg->setInt32("err", OK);
            }
            msg->post();
        }