Skip to content

Commit

Permalink
Do b/292111083 - remove reportedVideoSizeChange and trigger the callb…
Browse files Browse the repository at this point in the history
…ack on every video size change
  • Loading branch information
dsparano committed Jan 25, 2024
1 parent 08a306d commit 0e5a962
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e5a962

Please sign in to comment.