diff --git a/libraries/common/src/main/java/androidx/media3/common/util/Util.java b/libraries/common/src/main/java/androidx/media3/common/util/Util.java index 7ca58a56324..4d1bc4875e9 100644 --- a/libraries/common/src/main/java/androidx/media3/common/util/Util.java +++ b/libraries/common/src/main/java/androidx/media3/common/util/Util.java @@ -189,7 +189,8 @@ public final class Util { public static int audioLastFeedInputBufferStep = 0; public static int videoLastDrainOutputBufferStep = 0; public static int audioLastDrainOutputBufferStep = 0; - public static int currentAccumulatedVideoQueuedFrames = 0; + public static int currentQueuedInputBuffers = 0; + public static int currentProcessedOutputBuffers = 0; /** An empty long array. */ @UnstableApi public static final long[] EMPTY_LONG_ARRAY = new long[0]; diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java index cebd8a718c0..b2ea2535e4f 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java @@ -734,7 +734,8 @@ protected void onStarted() { hasNotifiedAvDesyncError = false; hasNotifiedAvDesyncSkippedFramesError = false; queuedFrames = 0; - Util.currentAccumulatedVideoQueuedFrames = 0; + Util.currentQueuedInputBuffers = 0; + Util.currentProcessedOutputBuffers = 0; videoFrameReleaseControl.onStarted(); } @@ -1227,7 +1228,7 @@ protected void onQueueInputBuffer(DecoderInputBuffer buffer) throws ExoPlaybackE // MIREGO: added queuedFrames++; - Util.currentAccumulatedVideoQueuedFrames++; + Util.currentQueuedInputBuffers++; if (queuedFrames >= NOTIFY_QUEUED_FRAMES_THRESHOLD) { maybeNotifyQueuedFrames(); } @@ -1613,6 +1614,7 @@ private void onProcessedTunneledEndOfStream() { @CallSuper @Override protected void onProcessedOutputBuffer(long presentationTimeUs) { + Util.currentProcessedOutputBuffers++; super.onProcessedOutputBuffer(presentationTimeUs); if (!tunneling) { buffersInCodecCount--;