Skip to content

Cherry pick PR #9691: android: Prevent use of media_codec_bridge_ in callbacks#10031

Merged
jasonzhangxx merged 2 commits intomainfrom
cherry-pick-main-9691
Apr 14, 2026
Merged

Cherry pick PR #9691: android: Prevent use of media_codec_bridge_ in callbacks#10031
jasonzhangxx merged 2 commits intomainfrom
cherry-pick-main-9691

Conversation

@cobalt-github-releaser-bot
Copy link
Copy Markdown
Collaborator

Refer to the original PR: #9691

Avoid a potential race condition during MediaDecoder destruction. Remove the
usage of media_codec_bridge_ in OnMediaCodecOutputFormatChanged,
which was only used for logging purposes. This prevents a crash if the callback
is invoked after the bridge has been destroyed.

Bug: 495444400

Avoid a potential race condition during MediaDecoder destruction. Remove
the
usage of `media_codec_bridge_` in `OnMediaCodecOutputFormatChanged`,
which was only used for logging purposes. This prevents a crash if the
callback
is invoked after the bridge has been destroyed.

Bug: 495444400
(cherry picked from commit e771967)
@cobalt-github-releaser-bot
Copy link
Copy Markdown
Collaborator Author

MERGE CONFLICT CAT

Caution

There were merge conflicts while cherry picking! Check out cherry-pick-main-9691 and fix the conflicts before proceeding. Check the log at https://github.com/youtube/cobalt/actions/runs/24421637693 for details.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


android: Prevent MediaCodecBridge use in callbacks

Remove usage of media_codec_bridge_ in OnMediaCodecOutputFormatChanged.
This was only for logging purposes and addressed a potential race
condition during MediaDecoder destruction. Prevents a crash if the
callback is invoked after the bridge has been destroyed.

Bug: 495444400

💡 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

@jasonzhangxx jasonzhangxx marked this pull request as ready for review April 14, 2026 20:51
@jasonzhangxx jasonzhangxx requested a review from kjyoun April 14, 2026 20:51
Copy link
Copy Markdown
Contributor

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

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 removes the code responsible for fetching and logging the frame resolution in the OnMediaCodecOutputFormatChanged function within starboard/android/shared/media_decoder.cc. I have no feedback to provide.

@jasonzhangxx jasonzhangxx merged commit cd91608 into main Apr 14, 2026
641 of 698 checks passed
@jasonzhangxx jasonzhangxx deleted the cherry-pick-main-9691 branch April 14, 2026 23:30
@github-actions github-actions bot added the cp-27.lts Cherry Pick to the 27.lts branch label Apr 14, 2026
cobalt-github-releaser-bot added a commit that referenced this pull request Apr 15, 2026
…media_codec_bridge_ in callbacks

Refer to original PR: #10031

Refer to the original PR: #9691

Avoid a potential race condition during MediaDecoder destruction. Remove
the
usage of `media_codec_bridge_` in `OnMediaCodecOutputFormatChanged`,
which was only used for logging purposes. This prevents a crash if the
callback
is invoked after the bridge has been destroyed.

Bug: 495444400

---------

Co-authored-by: Jason <jasonzh@google.com>

(cherry picked from commit cd91608)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp-27.lts Cherry Pick to the 27.lts branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants