Skip to content

Commit ee7ebb3

Browse files
James DongAndroid (Google) Code Review
authored andcommitted
Merge "Fix a hang issue where the first frame can be dropped for timelapse video recording." into ics-mr1
2 parents 67f1ceb + b888fd1 commit ee7ebb3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

media/libstagefright/CameraSourceTimeLapse.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) {
257257
mForceRead = false;
258258
*timestampUs =
259259
mLastFrameTimestampUs + mTimeBetweenTimeLapseVideoFramesUs;
260+
261+
// Really make sure that this video recording frame will not be dropped.
262+
if (*timestampUs < mStartTimeUs) {
263+
LOGI("set timestampUs to start time stamp %lld us", mStartTimeUs);
264+
*timestampUs = mStartTimeUs;
265+
}
260266
return false;
261267
}
262268
}

0 commit comments

Comments
 (0)