VPLAY-12202 - [Linear] black screen in sequential channel change#783
Merged
pstroffolino merged 33 commits intodev_sprint_25_2from Jan 13, 2026
Merged
VPLAY-12202 - [Linear] black screen in sequential channel change#783pstroffolino merged 33 commits intodev_sprint_25_2from
pstroffolino merged 33 commits intodev_sprint_25_2from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses a race condition that causes black screens during sequential channel changes. The issue occurs when a stop is initiated during license acquisition, potentially causing the previous session's license response to be incorrectly applied to a new session's CDM.
Key Changes:
- Added mutex protection around
createDrmSessionto synchronize with stop flow - Added abort check after license response is received to prevent applying stale licenses
- Added diagnostic logging for license fetcher operations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| middleware/drm/DrmSessionManager.cpp | Added logging to destructor for debugging session lifecycle |
| drm/AampDRMLicManager.cpp | Added post-response abort check and logging to prevent stale license application |
| AampDRMLicPreFetcher.cpp | Added mutex protection around createDrmSession and logging for license fetcher state |
…e doing sequential channel change Reason for change: In the problematic sequential channel change scenario, stop is initiated just after DRMLicenseManager has initiated the license request. Stop flow calls mDRMLicenseManager->setLicenseRequestAbort(true). Then as part of the new sessions start flow, this flag is again set back to false. The new session sends its content protecting data to PrefetchThread for initiating the license request. But PrefetchThread is still waiting for the license response of the previous session and when it receives the license, previous session's licence response gets updated to CDM and the new session's license acquisition fails. Changes: * Added a mutex lock in Prefetch thread for the createDrmSession flow, so that AampLicensePreFetcher::Term() or AampLicensePreFetcher::SetLicenseFetcher() can make sure that createDrmSession flow is finished before stop. Also, added license request abort check in AampDRMLicenseManager::acquireLicense after the license response is received, so that incorrect license won't be set to CDM. Test Procedure: Refer JIRA ticket Risks: low
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
…e doing sequential channel change Reason for change: In the problematic sequential channel change scenario, stop is initiated just after DRMLicenseManager has initiated the license request. Stop flow calls mDRMLicenseManager->setLicenseRequestAbort(true). Then as part of the new sessions start flow, this flag is again set back to false. The new session sends its content protecting data to PrefetchThread for initiating the license request. But PrefetchThread is still waiting for the license response of the previous session and when it receives the license, previous session's licence response gets updated to CDM and the new session's license acquisition fails. Changes: * Added a mutex lock in Prefetch thread for the createDrmSession flow, so that AampLicensePreFetcher::Term() or AampLicensePreFetcher::SetLicenseFetcher() can make sure that createDrmSession flow is finished before stop. Also, added license request abort check in AampDRMLicenseManager::acquireLicense after the license response is received, so that incorrect license won't be set to CDM. Test Procedure: Refer JIRA ticket Risks: low
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
cde7eda to
eb820d4
Compare
jfagunde
reviewed
Jan 8, 2026
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
jfagunde
reviewed
Jan 9, 2026
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
jfagunde
reviewed
Jan 9, 2026
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
… feature/VPLAY-12202
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Outdated
Show resolved
Hide resolved
test/utests/tests/AampDRMLicPreFetcherTests/AampDRMLicPreFetcherTestCases.cpp
Show resolved
Hide resolved
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
… feature/VPLAY-12202
Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
jfagunde
approved these changes
Jan 12, 2026
vinodkadungoth
pushed a commit
that referenced
this pull request
Feb 9, 2026
VPLAY-12202 - [Linear] black screen due to 'internal data error' while doing sequential channel change Reason for change: In the problematic sequential channel change scenario, stop is initiated just after DRMLicenseManager has initiated the license request. Stop flow calls mDRMLicenseManager->setLicenseRequestAbort(true). Then as part of the new sessions start flow, this flag is again set back to false. The new session sends its content protecting data to PrefetchThread for initiating the license request. But PrefetchThread is still waiting for the license response of the previous session and when it receives the license, previous session's licence response gets updated to CDM and the new session's license acquisition fails. Changes: * Added a mutex lock in Prefetch thread for the createDrmSession flow, so that AampLicensePreFetcher::Term() or AampLicensePreFetcher::SetLicenseFetcher() can make sure that createDrmSession flow is finished before stop. Also, added license request abort check in AampDRMLicenseManager::acquireLicense after the license response is received, so that incorrect license won't be set to CDM. Test Procedure: Refer JIRA ticket Risks: low Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
shripadbpersonal
pushed a commit
that referenced
this pull request
Feb 9, 2026
… (#1001) VPLAY-12202 - [Linear] black screen due to 'internal data error' while doing sequential channel change Reason for change: In the problematic sequential channel change scenario, stop is initiated just after DRMLicenseManager has initiated the license request. Stop flow calls mDRMLicenseManager->setLicenseRequestAbort(true). Then as part of the new sessions start flow, this flag is again set back to false. The new session sends its content protecting data to PrefetchThread for initiating the license request. But PrefetchThread is still waiting for the license response of the previous session and when it receives the license, previous session's licence response gets updated to CDM and the new session's license acquisition fails. Changes: * Added a mutex lock in Prefetch thread for the createDrmSession flow, so that AampLicensePreFetcher::Term() or AampLicensePreFetcher::SetLicenseFetcher() can make sure that createDrmSession flow is finished before stop. Also, added license request abort check in AampDRMLicenseManager::acquireLicense after the license response is received, so that incorrect license won't be set to CDM. Test Procedure: Refer JIRA ticket Risks: low Signed-off-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com> Co-authored-by: anjali-syna <206662904+anjali-syna@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Randomly black screen due to 'internal data stream error' is seen while doing sequential channel change
Reason for change: In the problematic sequential channel change scenario, stop is initiated just after DRMLicenseManager has initiated the license request through content security manager. Then the new session sends its content protecting data to PrefetchThread for initiating the license request. But PrefetchThread is still waiting for the license response of the previous session and this gets updated to CDM and the new session's license acquisition fails.
Changes:
Test Procedure: Refer JIRA ticket
Risks: low