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

Commit c6e9f6eb authored by Ray Essick's avatar Ray Essick
Browse files

Count all nuplayer frames

nuplayer counts frames: both total and dropped. One path during
intentional skipping counted those frames as dropped, but not as
part of the total. This moves the accumulation of total frames up
to a point where it will also include these intentionally
skipped/dropped frames.

Bug: 70297008
Test: manual
parent 44804b4c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -752,6 +752,8 @@ bool NuPlayer::Decoder::handleAnOutputBuffer(
        reply->setInt32("eos", true);
    }

    mNumFramesTotal += !mIsAudio;

    if (mSkipRenderingUntilMediaTimeUs >= 0) {
        if (timeUs < mSkipRenderingUntilMediaTimeUs) {
            ALOGV("[%s] dropping buffer at time %lld as requested.",
@@ -770,8 +772,6 @@ bool NuPlayer::Decoder::handleAnOutputBuffer(
        mSkipRenderingUntilMediaTimeUs = -1;
    }

    mNumFramesTotal += !mIsAudio;

    // wait until 1st frame comes out to signal resume complete
    notifyResumeCompleteIfNecessary();