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

Commit 5ed2faf6 authored by Wei Jia's avatar Wei Jia
Browse files

NuPlayer2Decoder: 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
Change-Id: I0f56c1edd949e937c85ff2392415b61bf7422a55
parent 599660ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -766,6 +766,8 @@ bool NuPlayer2::Decoder::handleAnOutputBuffer(
        reply->setInt32("eos", true);
    }

    mNumFramesTotal += !mIsAudio;

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

    mNumFramesTotal += !mIsAudio;

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