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
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
index a84d0e5..1b02adb 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
@@ -752,6 +752,8 @@
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 @@
mSkipRenderingUntilMediaTimeUs = -1;
}
- mNumFramesTotal += !mIsAudio;
-
// wait until 1st frame comes out to signal resume complete
notifyResumeCompleteIfNecessary();