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

Commit 4dbfc441 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents e9877928 780882de
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",