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

Commit 5b97e189 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Clean up logging for decreasing timestamp

In case of a BUFFER_ERROR, the timestamp may be decreasing due to
ERROR_BUF_CACHE strategy, where the framework holds onto error buffers
until the BUFFER_ERROR notify.

Do not print out the timestamp out-of-order logging if the buffer
already has CAMERA_BUFFER_STATUS_ERROR status.

Test: Camera CTS
Bug: 295842161
Change-Id: I1491e6d55430360536e2138c12a46275887abda2
parent e7f94684
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -772,7 +772,8 @@ status_t Camera3Stream::returnBuffer(const camera_stream_buffer &buffer,

    // Buffer status may be changed, so make a copy of the stream_buffer struct.
    camera_stream_buffer b = buffer;
    if (timestampIncreasing && timestamp != 0 && timestamp <= mLastTimestamp) {
    if (timestampIncreasing && timestamp != 0 && timestamp <= mLastTimestamp
            && b.status != CAMERA_BUFFER_STATUS_ERROR) {
        ALOGE("%s: Stream %d: timestamp %" PRId64 " is not increasing. Prev timestamp %" PRId64,
                __FUNCTION__, mId, timestamp, mLastTimestamp);
        b.status = CAMERA_BUFFER_STATUS_ERROR;