Bug 1654397 - Set crypto scheme when initializing video decoder CDM. r=alwu

Differential Revision: https://phabricator.services.mozilla.com/D88038
This commit is contained in:
Bryce Seager van Dyk 2020-08-25 02:58:57 +00:00
Родитель a58061ddd7
Коммит aaf9237935
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -71,6 +71,20 @@ RefPtr<MediaDataDecoder::InitPromise> ChromiumCDMVideoDecoder::Init() {
}
config.mImageWidth() = mConfig.mImage.width;
config.mImageHeight() = mConfig.mImage.height;
config.mEncryptionScheme() = cdm::EncryptionScheme::kUnencrypted;
switch (mConfig.mCrypto.mCryptoScheme) {
case CryptoScheme::None:
break;
case CryptoScheme::Cenc:
config.mEncryptionScheme() = cdm::EncryptionScheme::kCenc;
break;
case CryptoScheme::Cbcs:
config.mEncryptionScheme() = cdm::EncryptionScheme::kCenc;
break;
default:
MOZ_ASSERT_UNREACHABLE("Should not have unrecognized encryption type");
break;
}
RefPtr<gmp::ChromiumCDMParent> cdm = mCDMParent;
VideoInfo info = mConfig;