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

Commit c0d3b9a3 authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am ee7ebb32: Merge "Fix a hang issue where the first frame can be dropped for...

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.
parents d3011ec5 49e82712
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;
        }
    }