Skip to content

Cherry pick PR #8421: android: Reset operating frame rate during flush - #8459

Merged
johnxwork merged 1 commit into
26.androidfrom
cherry-pick-26.android-8421
Dec 18, 2025
Merged

johnxwork merged 1 commit into
26.androidfrom
cherry-pick-26.android-8421

Conversation

@cobalt-github-releaser-bot

Copy link
Copy Markdown
Collaborator

Refer to the original PR: #8421

When the MediaCodecBridge is flushed, the previously estimated operating
frame rate becomes invalid. Resetting the frame rate estimator ensures
that new frame rate calculations start from a clean state after a flush,
preventing stale or incorrect frame rate data from affecting playback
or adaptation logic. This is important for accurate media synchronization
and performance on Android.

Issue: 467911298
Issue: 320568573

When the MediaCodecBridge is flushed, the previously estimated operating
frame rate becomes invalid. Resetting the frame rate estimator ensures
that new frame rate calculations start from a clean state after a flush,
preventing stale or incorrect frame rate data from affecting playback
or adaptation logic. This is important for accurate media
synchronization
and performance on Android.

Issue: 467911298
Issue: 320568573
(cherry picked from commit ef8d720)
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


android: Reset frame rate estimator during flush

When the MediaCodecBridge is flushed, the previously estimated
operating frame rate becomes invalid. Resetting the estimator
ensures new calculations start from a clean state after a flush,
preventing stale data from affecting playback or adaptation logic.
This improves media synchronization and performance on Android.

Bug: 467911298, 320568573

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a cherry-pick to reset the operating frame rate estimator during a media codec flush. The logic to perform this reset within a finally block is sound, ensuring it executes regardless of whether the flush operation succeeds or fails. I have added one suggestion to improve the robustness of the exception handling, which is a good practice for cleanup code in finally blocks.

@johnxwork
johnxwork merged commit 1d2d6b6 into 26.android Dec 18, 2025
214 checks passed
@johnxwork
johnxwork deleted the cherry-pick-26.android-8421 branch December 18, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants