OSDN Git Service

Camera: Fix error check for HFR timestamp
authorShuzhen Wang <shuzhenwang@google.com>
Mon, 27 Feb 2017 07:29:04 +0000 (23:29 -0800)
committerShuzhen Wang <shuzhenwang@google.com>
Fri, 17 Mar 2017 17:04:28 +0000 (10:04 -0700)
With Camera HAL sending empty metadata for HFR batching, service
shouldn't check matching timestamp for empty metadata.

Test: Manually test high speed recording
Bug: 35775704
Change-Id: I68f3c16ea9a91f15c70e406540764b02cb6951e1

services/camera/libcameraservice/device3/Camera3Device.cpp

index 204f68c..71e52af 100644 (file)
@@ -2513,8 +2513,9 @@ void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) {
             (request.haveResultMetadata && shutterTimestamp != 0))) {
         ATRACE_ASYNC_END("frame capture", frameNumber);
 
-        // Sanity check - if sensor timestamp matches shutter timestamp
-        if (request.requestStatus == OK &&
+        // Sanity check - if sensor timestamp matches shutter timestamp in the
+        // case of request having callback.
+        if (request.hasCallback && request.requestStatus == OK &&
                 sensorTimestamp != shutterTimestamp) {
             SET_ERR("sensor timestamp (%" PRId64
                 ") for frame %d doesn't match shutter timestamp (%" PRId64 ")",