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

Commit fe7e0c61 authored by Alex Ray's avatar Alex Ray
Browse files

camera: Dont segfault when result lacks timestamp

Also make a log message more useful.

Change-Id: Id8b65a9b55e1ebe41598dc2db4b0b2aa3f161965
parent 20cb300b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -723,7 +723,7 @@ status_t Camera3Device::deleteReprocessStream(int id) {
status_t Camera3Device::createDefaultRequest(int templateId,
        CameraMetadata *request) {
    ATRACE_CALL();
    ALOGV("%s: E", __FUNCTION__);
    ALOGV("%s: for template %d", __FUNCTION__, templateId);
    Mutex::Autolock l(mLock);

    switch (mStatus) {
@@ -1254,8 +1254,7 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) {
        if (entry.count == 0) {
            SET_ERR("No timestamp provided by HAL for frame %d!",
                    frameNumber);
        }
        if (timestamp != entry.data.i64[0]) {
        } else if (timestamp != entry.data.i64[0]) {
            SET_ERR("Timestamp mismatch between shutter notify and result"
                    " metadata for frame %d (%lld vs %lld respectively)",
                    frameNumber, timestamp, entry.data.i64[0]);