Skip to content

Commit b259f35

Browse files
Merge pull request #647 from rdkcentral/feature/VPLAY-11530_2.9.0_8.3
VPLAY-11530: Increase in PLTV XSTPP-999 Failures on both Xi1/ES1
2 parents 40a5b5f + b156a5e commit b259f35

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
@@ -1393,9 +1393,17 @@ void AampDRMLicenseManager::clearDrmSession(bool forceClearSession)
13931393
{
13941394
mDrmSessionManager->clearDrmSession(forceClearSession);
13951395
for(int i = 0 ; i < mMaxDRMSessions;i++)
1396-
{
1397-
mLicenseDownloader[i].Clear();
1398-
}
1396+
{
1397+
bool isFailedKeyId = mDRMSessionManager->getFailedKeyIdStatus(i);
1398+
if(( mDRMSessionManager->drmSessionContexts != NULL && (isFailedKeyId || forceClearSession) ))
1399+
{
1400+
if(mDRMSessionManager->drmSessionContexts[i].drmSession != NULL)
1401+
{
1402+
AAMPLOG_INFO("Clearing Session %d, isFailedKeyId=%d, forceClearSession=%d",i, isFailedKeyId, forceClearSession);
1403+
mLicenseDownloader[i].Clear();
1404+
}
1405+
}
1406+
}
13991407
}
14001408

14011409
/**

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)