RDKEMW-19892: [RDKEMW] [BCM Rogers Monarch IUI V2] Linear trick play (FF/RW/Seek) leads to blank screen, device hang, followed by automatic reboot. Multiple critical processes (gmem, WPENetworkProce, WorkerPoolType: etc.) crash were observed.#206
Merged
2 commits merged intoJul 20, 2026
Conversation
…(FF/RW/Seek) leads to blank screen, device hang, followed by automatic reboot. Multiple critical processes (gmem, WPENetworkProce, WorkerPoolType: etc.) crash were observed.
Contributor
There was a problem hiding this comment.
Pull request overview
Improves Widevine DRM key selection logic to better handle multi-key streams and avoid crashes/hangs during playback operations (e.g., trick-play) by correctly resolving the “default” key ID across differing key ID encodings.
Changes:
- Adds UUID-string (with/without dashes) to 16-byte binary conversion to match PSSH v1 binary KIDs in
setDefaultKeyID(). - Makes
getKey()safe forstd::map<int, ...>slot lookup by usingfind()and falling back to the first map entry instead of assuming slot0. - Adds clearer logging around mismatch/fallback scenarios.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+188
to
+195
| mDefaultKeySlot = -1; | ||
| std::vector<uint8_t> defaultKeyID(cencData.begin(), cencData.end()); | ||
| // Also convert UUID string (e.g. "f3dff538-b8c9-58e4-e8cd-96cf811d32dc") to 16-byte binary | ||
| // for comparison against binary keyIDs parsed from PSSH | ||
| std::vector<uint8_t> defaultKeyIDBinary; | ||
| std::string uuidHex; | ||
| uuidHex.reserve(cencData.size()); | ||
| for (char c : cencData) |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
drm/helper/WidevineDrmHelper.cpp:194
- New UUID-string-to-16-byte parsing logic in
setDefaultKeyIDisn’t covered by unit tests. Adding tests for (1) UUID with hyphens, (2) UUID without hyphens, and (3) invalid hex (should not match) would help prevent regressions in key selection.
// Also convert UUID string (e.g. "f3dff538-b8c9-58e4-e8cd-96cf811d32dc") to 16-byte binary
// for comparison against binary keyIDs parsed from PSSH
std::vector<uint8_t> defaultKeyIDBinary;
std::string uuidHex;
uuidHex.reserve(cencData.size());
Comment on lines
264
to
267
| else | ||
| { | ||
| MW_LOG_ERR("No key"); | ||
| MW_LOG_ERR("No key available - mKeyIDs is empty"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.