diff options
author | James Dong <jdong@google.com> | 2011-11-08 06:58:11 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-08 06:58:11 +0000 |
commit | 44e4983db403af8ec851dc07fb9265a2a12583e0 (patch) | |
tree | ada916b96182e1706f2c36f874caf3e071e3ae42 /media | |
parent | 1d02f346506d58a01d005dd403d7ae5c74cc0924 (diff) | |
parent | ee7ebb3257d9337627b175835dc3d08f9b8ab339 (diff) | |
download | frameworks_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.cpp | 6 |
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; } } |