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

Commit 6056bdda authored by Zhijun He's avatar Zhijun He
Browse files

Camera: don't dereference timestamp if it is missing

Bug: 14059542
Change-Id: I8b45a98ef4b296db314cab3819d11626ac7211be
parent 27a17103
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;