@@ -82,7 +82,7 @@ void SESSION::CSession::DisposeSampleDecrypter()
82
82
{
83
83
for (auto & cdmSession : m_cdmSessions)
84
84
{
85
- cdmSession.m_cdmSessionStr = nullptr ;
85
+ cdmSession.m_sessionId . clear () ;
86
86
cdmSession.m_cencSingleSampleDecrypter = nullptr ;
87
87
}
88
88
}
@@ -293,8 +293,8 @@ bool SESSION::CSession::PreInitializeDRM(std::string& challengeB64,
293
293
m_decrypter->CreateSingleSampleDecrypter (initData, decKid, " " , true ,
294
294
CryptoMode::AES_CTR)) != nullptr )
295
295
{
296
- session.m_cdmSessionStr = session.m_cencSingleSampleDecrypter ->GetSessionId ();
297
- sessionId = session.m_cdmSessionStr ;
296
+ session.m_sessionId = session.m_cencSingleSampleDecrypter ->GetSessionId ();
297
+ sessionId = session.m_sessionId ;
298
298
challengeB64 = m_decrypter->GetChallengeB64Data (session.m_cencSingleSampleDecrypter );
299
299
}
300
300
else
@@ -466,7 +466,7 @@ bool SESSION::CSession::InitializeDRM(bool addDefaultKID /* = false */)
466
466
m_decrypter->GetCapabilities (session.m_cencSingleSampleDecrypter , defaultKid,
467
467
sessionPsshset.media_ , session.m_decrypterCaps );
468
468
469
- session.m_cdmSessionStr = session.m_cencSingleSampleDecrypter ->GetSessionId ();
469
+ session.m_sessionId = session.m_cencSingleSampleDecrypter ->GetSessionId ();
470
470
471
471
if (session.m_decrypterCaps .flags & DRM::DecrypterCapabilites::SSD_INVALID)
472
472
{
@@ -927,14 +927,14 @@ bool SESSION::CSession::IsCDMSessionSecurePath(size_t index)
927
927
DRM::DecrypterCapabilites::SSD_SECURE_PATH) != 0 ;
928
928
}
929
929
930
- const char * SESSION::CSession::GetCDMSession (unsigned int index)
930
+ std::string SESSION::CSession::GetCDMSession (unsigned int index)
931
931
{
932
932
if (index >= m_cdmSessions.size ())
933
933
{
934
934
LOG::LogF (LOGERROR, " No CDM session at index %u" , index );
935
- return nullptr ;
935
+ return {} ;
936
936
}
937
- return m_cdmSessions[index ].m_cdmSessionStr ;
937
+ return m_cdmSessions[index ].m_sessionId ;
938
938
}
939
939
940
940
uint64_t SESSION::CSession::PTSToElapsed (uint64_t pts)
@@ -1294,7 +1294,7 @@ std::shared_ptr<Adaptive_CencSingleSampleDecrypter> SESSION::CSession::GetSingle
1294
1294
for (std::vector<CCdmSession>::iterator b (m_cdmSessions.begin () + 1 ), e (m_cdmSessions.end ());
1295
1295
b != e; ++b)
1296
1296
{
1297
- if (b-> m_cdmSessionStr && sessionId == b->m_cdmSessionStr )
1297
+ if (sessionId == b->m_sessionId )
1298
1298
return b->m_cencSingleSampleDecrypter ;
1299
1299
}
1300
1300
return nullptr ;
0 commit comments