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

Commit f0948bcf authored by Zhijun He's avatar Zhijun He Committed by Android (Google) Code Review
Browse files

Merge "Camera: don't dereference timestamp if it is missing"

parents 96b0d5ef 6056bdda
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -584,13 +584,16 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCaptureWait(
        entry = mNewFrame.find(ANDROID_SENSOR_TIMESTAMP);
        if (entry.count == 0) {
            ALOGE("No timestamp field in capture frame!");
        }
        } else if (entry.count == 1) {
            if (entry.data.i64[0] != mCaptureTimestamp) {
                ALOGW("Mismatched capture timestamps: Metadata frame %" PRId64 ","
                        " captured buffer %" PRId64,
                        entry.data.i64[0],
                        mCaptureTimestamp);
            }
        } else {
            ALOGE("Timestamp metadata is malformed!");
        }
        client->removeFrameListener(mCaptureId, mCaptureId + 1, this);

        mNewFrameReceived = false;