Skip to content

Commit 1b02bf5

Browse files
committed
fixup
1 parent 87fd790 commit 1b02bf5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/decrypters/widevineandroid/WVDecrypter.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,25 @@ std::shared_ptr<Adaptive_CencSingleSampleDecrypter> CWVDecrypterA::CreateSingleS
6464
const std::vector<uint8_t>& defaultKeyId,
6565
CryptoMode cryptoMode)
6666
{
67+
const std::string& keySystem = config.keySystem;
6768
std::shared_ptr<CWVCdmAdapterA> wvAdapter;
6869

6970
// Reuse existing adapters
70-
if (STRING::KeyExists(m_wvAdapters, config.keySystem))
71+
if (STRING::KeyExists(m_wvAdapters, keySystem))
7172
{
72-
wvAdapter = m_wvAdapters[config.keySystem];
73+
wvAdapter = m_wvAdapters[keySystem];
7374
}
7475
else
7576
{
76-
wvAdapter = std::make_shared<CWVCdmAdapterA>(config.keySystem, config, m_classLoader, this);
77+
wvAdapter = std::make_shared<CWVCdmAdapterA>(keySystem, config, m_classLoader, this);
7778

7879
if (!wvAdapter->GetCDM())
7980
{
8081
LOG::LogF(LOGERROR, "Widevine adapter not created");
8182
return nullptr;
8283
}
84+
85+
m_wvAdapters.emplace(keySystem, wvAdapter);
8386
}
8487

8588
return std::make_shared<CWVCencSingleSampleDecrypterA>(wvAdapter.get(), defaultKeyId);

0 commit comments

Comments
 (0)