summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-11-08 06:58:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-08 06:58:11 +0000
commit44e4983db403af8ec851dc07fb9265a2a12583e0 (patch)
treeada916b96182e1706f2c36f874caf3e071e3ae42 /media
parent1d02f346506d58a01d005dd403d7ae5c74cc0924 (diff)
parentee7ebb3257d9337627b175835dc3d08f9b8ab339 (diff)
downloadframeworks_base-44e4983db403af8ec851dc07fb9265a2a12583e0.zip
frameworks_base-44e4983db403af8ec851dc07fb9265a2a12583e0.tar.gz
frameworks_base-44e4983db403af8ec851dc07fb9265a2a12583e0.tar.bz2
am ee7ebb32: Merge "Fix a hang issue where the first frame can be dropped for timelapse video recording." into ics-mr1
* commit 'ee7ebb3257d9337627b175835dc3d08f9b8ab339': Fix a hang issue where the first frame can be dropped for timelapse video recording.
Diffstat (limited to 'media')
-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;
}
}