Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49e82712 authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Fix a hang issue where the first frame can be dropped for timelapse...

Merge "Fix a hang issue where the first frame can be dropped for timelapse video recording." into ics-mr1
parents 197388e5 93594b5a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;
        }
    }