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

Commit 24ac9e1e authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Don't time out prematurely for video encoding waiting for output buffers"

parents 14ee9a11 92d6ea3e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3199,9 +3199,16 @@ void OMXCodec::setState(State newState) {
}

status_t OMXCodec::waitForBufferFilled_l() {

    if (mIsEncoder) {
        // For timelapse video recording, the timelapse video recording may
        // not send an input frame for a _long_ time. Do not use timeout
        // for video encoding.
        return mBufferFilled.wait(mLock);
    }
    status_t err = mBufferFilled.waitRelative(mLock, kBufferFilledEventTimeOutUs);
    if (err != OK) {
        LOGE("Timed out waiting for buffers from video encoder: %d/%d",
        CODEC_LOGE("Timed out waiting for output buffers: %d/%d",
            countBuffersWeOwn(mPortBuffers[kPortIndexInput]),
            countBuffersWeOwn(mPortBuffers[kPortIndexOutput]));
    }