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

Commit 977442c4 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 'ee7ebb32':
  Fix a hang issue where the first frame can be dropped for timelapse video recording.
parents bfd97835 ee7ebb32
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;
        }
    }