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

Commit a027bf78 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodec: request initial input buffers after start complete callback

Bug: 229655684
Test: atest android.media.encoder.cts.VideoEncoderTest
Change-Id: I66e3f62270450742072f0490c16acf0c49d59722
parent d8bef59f
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1826,15 +1826,13 @@ void CCodec::start() {
        return;
    }

    err2 = mChannel->requestInitialInputBuffers();
    mCallback->onStartCompleted();

    err2 = mChannel->requestInitialInputBuffers();
    if (err2 != OK) {
        ALOGE("Initial request for Input Buffers failed");
        mCallback->onError(err2, ACTION_CODE_FATAL);
        return;
    }
    mCallback->onStartCompleted();

}

void CCodec::initiateShutdown(bool keepComponentAllocated) {
@@ -2128,7 +2126,11 @@ void CCodec::signalResume() {
        state->set(RUNNING);
    }

    (void)mChannel->requestInitialInputBuffers();
    status_t err = mChannel->requestInitialInputBuffers();
    if (err != OK) {
        ALOGE("Resume request for Input Buffers failed");
        mCallback->onError(err, ACTION_CODE_FATAL);
    }
}

void CCodec::signalSetParameters(const sp<AMessage> &msg) {