summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2014-04-15 17:06:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-15 17:06:04 +0000
commitf0948bcf06b8a9679f4b772237c80ee63829423f (patch)
treefa3c6bf9ef16143a65c25ab121ab7224a4e12ad8 /services
parent96b0d5ef85d4d71690c41c84456afbf19864c785 (diff)
parent6056bdda5b17c62ba320c806489e4d1a3b7653c7 (diff)
downloadframeworks_av-f0948bcf06b8a9679f4b772237c80ee63829423f.zip
frameworks_av-f0948bcf06b8a9679f4b772237c80ee63829423f.tar.gz
frameworks_av-f0948bcf06b8a9679f4b772237c80ee63829423f.tar.bz2
Merge "Camera: don't dereference timestamp if it is missing"
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp
index e5f5064..8268f65 100644
--- a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp
+++ b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp
@@ -584,12 +584,15 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCaptureWait(
entry = mNewFrame.find(ANDROID_SENSOR_TIMESTAMP);
if (entry.count == 0) {
ALOGE("No timestamp field in capture frame!");
- }
- if (entry.data.i64[0] != mCaptureTimestamp) {
- ALOGW("Mismatched capture timestamps: Metadata frame %" PRId64 ","
- " captured buffer %" PRId64,
- entry.data.i64[0],
- mCaptureTimestamp);
+ } 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);