diff options
author | Zhijun He <zhijunhe@google.com> | 2014-11-26 18:01:07 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-26 18:01:07 +0000 |
commit | d802d0718d7639da1bef1128a840cfd05200af55 (patch) | |
tree | 8eb7f6fd09e9a8f5e6e2de86664b84f64083e468 /services/camera | |
parent | d1ad284db3a84fe9f3dc027149b5f2433e3a8589 (diff) | |
parent | ec7b26f06f7b1b6334ef1139ac33548ed0510284 (diff) | |
download | frameworks_av-d802d0718d7639da1bef1128a840cfd05200af55.zip frameworks_av-d802d0718d7639da1bef1128a840cfd05200af55.tar.gz frameworks_av-d802d0718d7639da1bef1128a840cfd05200af55.tar.bz2 |
am ec7b26f0: am 512dd849: Merge "camera: fix frame deletion logic in mInFlightMap" into lmp-mr1-dev
* commit 'ec7b26f06f7b1b6334ef1139ac33548ed0510284':
camera: fix frame deletion logic in mInFlightMap
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index 6a7f9e7..5281ea6 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -2028,8 +2028,12 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { // Check if everything has arrived for this result (buffers and metadata), remove it from // InFlightMap if both arrived or HAL reports error for this request (i.e. during flush). - if ((request.requestStatus != OK) || - (request.haveResultMetadata && request.numBuffersLeft == 0)) { + // For per-frame error notifications, camera3.h requirements state that all the + // buffer handles for a failed frame capture must be returned via process_capture_result() + // call(s). Hence, Camera3Device needs to ensure that the frame entry is not deleted from + // mInFlightMap until all buffers for that frame have been returned by HAL. + if ((request.numBuffersLeft == 0) && + ((request.requestStatus != OK) || (request.haveResultMetadata))) { ATRACE_ASYNC_END("frame capture", frameNumber); mInFlightMap.removeItemsAt(idx, 1); } |