Skip to content

Commit b1eaadc

Browse files
Merge pull request #648 from rdkcentral/feature/VPLAY-11530_2.7.1_8_2_drm
VPLAY-11530: Increase in PLTV XSTPP-999 Failures on both Xi1/ES1
2 parents 98d5d3b + 064439d commit b1eaadc

3 files changed

Lines changed: 33 additions & 3 deletions

File tree

drm/AampDRMLicManager.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,9 +1394,17 @@ void AampDRMLicenseManager::clearDrmSession(bool forceClearSession)
13941394
{
13951395
mDrmSessionManager->clearDrmSession(forceClearSession);
13961396
for(int i = 0 ; i < mMaxDRMSessions;i++)
1397-
{
1398-
mLicenseDownloader[i].Clear();
1399-
}
1397+
{
1398+
bool isFailedKeyId = mDRMSessionManager->getFailedKeyIdStatus(i);
1399+
if(( mDRMSessionManager->drmSessionContexts != NULL && (isFailedKeyId || forceClearSession) ))
1400+
{
1401+
if(mDRMSessionManager->drmSessionContexts[i].drmSession != NULL)
1402+
{
1403+
AAMPLOG_INFO("Clearing Session %d, isFailedKeyId=%d, forceClearSession=%d",i, isFailedKeyId, forceClearSession);
1404+
mLicenseDownloader[i].Clear();
1405+
}
1406+
}
1407+
}
14001408
}
14011409

14021410
/**

middleware/drm/DrmSessionManager.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ void DrmSessionManager::clearAccessToken()
167167
}
168168
}
169169

170+
/**
171+
* @brief Get the failed key ID status for a specific session
172+
*/
173+
bool DrmSessionManager::getFailedKeyIdStatus(int sessionIndex)
174+
{
175+
if (sessionIndex >= 0 && sessionIndex < mMaxDrmSessions && cachedKeyIDs)
176+
{
177+
return cachedKeyIDs[sessionIndex].isFailedKeyId;
178+
}
179+
return false;
180+
}
181+
170182
/**
171183
* @brief Clean up the Session Data if license key acquisition failed or if LicenseCaching is false.
172184
*/

middleware/drm/DrmSessionManager.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,16 @@ class DrmSessionManager
301301
* @return void.
302302
*/
303303
void clearFailedKeyIds();
304+
305+
306+
/**
307+
* @fn getFailedKeyIdStatus
308+
*
309+
* @param sessionIndex session index to check
310+
* @return bool - true if the key ID is marked as failed, false otherwise
311+
*/
312+
bool getFailedKeyIdStatus(int sessionIndex);
313+
304314
/**
305315
* @fn clearDrmSession
306316
*

0 commit comments

Comments
 (0)