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

Commit f7fa2009 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Do not treat non-increasing timestamp as fatal

Certain devices generate duplicate timestamps for cases like video
recording. So do not treat non-increasing timestamps as fatal for now.

Test: Failed camera CTS on Pixel device
Bug: 113670946
Change-Id: I3708f46111edf031f48f460e4efce9f9c46f174e
parent 8eed46df
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -269,8 +269,7 @@ status_t Camera3OutputStream::returnBufferCheckedLocked(
        }

        if (timestamp == 0) {
            ALOGE("%s: Stream %d: timestamp shouldn't be 0", __FUNCTION__, mId);
            return BAD_VALUE;
            ALOGW("%s: Stream %d: timestamp shouldn't be 0", __FUNCTION__, mId);
        }

        /* Certain consumers (such as AudioSource or HardwareComposer) use
+1 −2
Original line number Diff line number Diff line
@@ -663,9 +663,8 @@ status_t Camera3Stream::returnBuffer(const camera3_stream_buffer &buffer,
    removeOutstandingBuffer(buffer);

    if (timestampIncreasing && timestamp != 0 && timestamp <= mLastTimestamp) {
        ALOGE("%s: Stream %d: timestamp %" PRId64 " is not increasing. Prev timestamp %" PRId64,
        ALOGW("%s: Stream %d: timestamp %" PRId64 " is not increasing. Prev timestamp %" PRId64,
                __FUNCTION__, mId, timestamp, mLastTimestamp);
        return BAD_VALUE;
    }
    mLastTimestamp = timestamp;