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

Commit c22f8421 authored by Praveen Chavan's avatar Praveen Chavan Committed by Linux Build Service Account
Browse files

Stagefright: Do not skip frames in time-lapse-source for high-speed

Avoid the frame-skip logic in time-lapse source if capture-rate
exceeds video-fps. Not doing so will drop frames and also cause
retrograde timestamps and an assertion in CameraSource.

Change-Id: I8420e44ab96484f0d6301c366a24eefc8efeaf0f
parent 9c7d957b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -279,7 +279,8 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) {
    // The first 2 output frames from the encoder are: decoder specific info and
    // the compressed video frame data for the first input video frame.
    if (mNumFramesEncoded >= 1 && *timestampUs <
        (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenFrameCaptureUs)) {
        (mLastTimeLapseFrameRealTimestampUs + mTimeBetweenFrameCaptureUs) &&
        (mTimeBetweenFrameCaptureUs > mTimeBetweenTimeLapseVideoFramesUs + 1)) {
        // Skip all frames from last encoded frame until
        // sufficient time (mTimeBetweenFrameCaptureUs) has passed.
        // Tell the camera to release its recording frame and return.