Skip to content

Fix DV7 black screen issue on Exynos chips by safely stripping MediaFormat profile keys during fallback - #1847

Open
KennyPhan123 wants to merge 10 commits into
anilbeesetti:mainfrom
KennyPhan123:fix-dv-exynos
Open

Fix DV7 black screen issue on Exynos chips by safely stripping MediaFormat profile keys during fallback#1847
KennyPhan123 wants to merge 10 commits into
anilbeesetti:mainfrom
KennyPhan123:fix-dv-exynos

Conversation

@KennyPhan123

Copy link
Copy Markdown

Describe the bug
When the dv7Fallback preference is enabled, Exynos devices (e.g., Samsung A54/A55/A56) play audio but show a completely black screen for Dolby Vision Profile 7 videos. The Exynos hardware HEVC decoder silently drops frames instead of throwing a decoding exception when the MediaFormat contains KEY_PROFILE = 128 (HEVCProfileMain10HDR10Plus/DV) and KEY_COLOR_TRANSFER_REQUEST.

This issue does not exist in older ExoPlayer versions (e.g., JustPlayer) because they do not send KEY_COLOR_TRANSFER_REQUEST.

Solution
This PR fixes the issue by wrapping the MediaCodecAdapter.Factory inside NextRenderersFactory.
When dv7Fallback is true and the stream is VIDEO_DOLBY_VISION, it aggressively strips KEY_PROFILE and KEY_COLOR_TRANSFER_REQUEST from the MediaFormat before creating the decoder. This forces the Exynos hardware decoder to treat it as a generic HEVC stream and successfully output HDR frames without silently dropping them.

Testing
Tested and confirmed working perfectly on Samsung A56 5G (Exynos chip).

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.

1 participant