From 0e5a96283355fdee6efb6f88846fa577942751fc Mon Sep 17 00:00:00 2001 From: Daniele Sparano Date: Thu, 25 Jan 2024 16:45:12 +0000 Subject: [PATCH] Do b/292111083 - remove reportedVideoSizeChange and trigger the callback on every video size change --- .../media3/exoplayer/video/VideoFrameRenderControl.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/VideoFrameRenderControl.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/VideoFrameRenderControl.java index 3824ac6eb28..624c977c819 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/VideoFrameRenderControl.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/VideoFrameRenderControl.java @@ -81,8 +81,6 @@ void renderFrame( private VideoSize reportedVideoSize; private long outputStreamOffsetUs; - // TODO b/292111083 - Remove the field and trigger the callback on every video size change. - private boolean reportedVideoSizeChange; private long lastPresentationTimeUs; /** Creates an instance. */ @@ -122,8 +120,6 @@ public void flush() { // we keep the latest value of pendingOutputVideoSize videoSizeChanges.clear(); } - // Do not clear reportedVideoSizeChange because we report a video size change at most once - // (b/292111083). } /** Returns whether the renderer is ready. */ @@ -230,9 +226,8 @@ private void renderFrame(boolean shouldRenderImmediately) { long presentationTimeUs = checkStateNotNull(presentationTimestampsUs.remove()); boolean videoSizeUpdated = maybeUpdateVideoSize(presentationTimeUs); - if (videoSizeUpdated && !reportedVideoSizeChange) { + if (videoSizeUpdated) { frameRenderer.onVideoSizeChanged(reportedVideoSize); - reportedVideoSizeChange = true; } long renderTimeNs = shouldRenderImmediately