summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/CameraSourceTimeLapse.cpp
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-10-26 23:47:55 -0700
committerJames Dong <jdong@google.com>2011-10-26 23:47:55 -0700
commit93594b5aa16dbbb0b196f6e181a8ca099d7ab62b (patch)
tree2d936537947edf25a440817cbdd82a32d65f3609 /media/libstagefright/CameraSourceTimeLapse.cpp
parent71adab54edf9d0e2c89473d3be12edb6b9dc4549 (diff)
downloadframeworks_av-93594b5aa16dbbb0b196f6e181a8ca099d7ab62b.zip
frameworks_av-93594b5aa16dbbb0b196f6e181a8ca099d7ab62b.tar.gz
frameworks_av-93594b5aa16dbbb0b196f6e181a8ca099d7ab62b.tar.bz2
Fix a hang issue where the first frame can be dropped for timelapse video recording.
Change-Id: I04754f1005a983953a80a659ff13f8762d0e120c related-to-bug: 5523502
Diffstat (limited to 'media/libstagefright/CameraSourceTimeLapse.cpp')
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 1ba79e5..e4de20a 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -257,6 +257,12 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) {
mForceRead = false;
*timestampUs =
mLastFrameTimestampUs + mTimeBetweenTimeLapseVideoFramesUs;
+
+ // Really make sure that this video recording frame will not be dropped.
+ if (*timestampUs < mStartTimeUs) {
+ LOGI("set timestampUs to start time stamp %lld us", mStartTimeUs);
+ *timestampUs = mStartTimeUs;
+ }
return false;
}
}