mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1245789 - Handle unencrypted samples in encrypted media. r=gerald
Some encrypted MP4 files lack subsample info for some samples, so we need this check to prevent us crashing on such files. MozReview-Commit-ID: AXqOCAlb7IY
This commit is contained in:
parent
78b35c32d6
commit
2a0d4dd3a3
@ -169,15 +169,20 @@ GMPDecryptorParent::Decrypt(uint32_t aId,
|
||||
}
|
||||
|
||||
// Caller should ensure parameters passed in are valid.
|
||||
MOZ_ASSERT(!aBuffer.IsEmpty() && aCrypto.mValid);
|
||||
MOZ_ASSERT(!aBuffer.IsEmpty());
|
||||
|
||||
GMPDecryptionData data(aCrypto.mKeyId,
|
||||
aCrypto.mIV,
|
||||
aCrypto.mPlainSizes,
|
||||
aCrypto.mEncryptedSizes,
|
||||
aCrypto.mSessionIds);
|
||||
if (aCrypto.mValid) {
|
||||
GMPDecryptionData data(aCrypto.mKeyId,
|
||||
aCrypto.mIV,
|
||||
aCrypto.mPlainSizes,
|
||||
aCrypto.mEncryptedSizes,
|
||||
aCrypto.mSessionIds);
|
||||
|
||||
Unused << SendDecrypt(aId, aBuffer, data);
|
||||
Unused << SendDecrypt(aId, aBuffer, data);
|
||||
} else {
|
||||
GMPDecryptionData data;
|
||||
Unused << SendDecrypt(aId, aBuffer, data);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user