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

Commit 717f4643 authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by android-build-merger
Browse files

Merge "Fix the calculation of the number of frames" into oc-mr1-dev

am: 4dbfc441

Change-Id: Ib25093ad8cea4cca2adc45eaebb4a2d1e91079e0
parents 14a0700d 4dbfc441
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ bool GraphicBufferSource::calculateCodecTimestamp_l(
        } else {
            // snap to nearest capture point
            int64_t nFrames = std::llround(
                    (timeUs - mPrevCaptureUs) * mCaptureFps);
                    (timeUs - mPrevCaptureUs) * mCaptureFps / 1000000);
            if (nFrames <= 0) {
                // skip this frame as it's too close to previous capture
                ALOGV("skipping frame, timeUs %lld", static_cast<long long>(timeUs));
@@ -741,9 +741,9 @@ bool GraphicBufferSource::calculateCodecTimestamp_l(
            }
            mFrameCount += nFrames;
            mPrevCaptureUs = mBaseCaptureUs + std::llround(
                    mFrameCount / mCaptureFps);
                    mFrameCount * 1000000 / mCaptureFps);
            mPrevFrameUs = mBaseFrameUs + std::llround(
                    mFrameCount / mFps);
                    mFrameCount * 1000000 / mFps);
        }

        ALOGV("timeUs %lld, captureUs %lld, frameUs %lld",