Only pass whole clear frames to OEMCrypto_CopyBuffer
[ Merge from http://go/wvgerrit/16499 ] Passing clear subsamples to OEMCrypto_CopyBuffer and encrypted subsamples to OEMCrypto_DecryptCTR was causing performance issues as a lack of crypto session information made it hard to associate clear and encrypted subsamples with each other. [ Based on a patch from Kelly Ren/Qualcomm ] b/26538744 Change-Id: I4644f197b2ec481f6aa89d3fce29b22ebb7b0c06
This commit is contained in:
@@ -669,7 +669,9 @@ CdmResponseType CryptoSession::Decrypt(const CdmDecryptionParameters& params) {
|
||||
}
|
||||
|
||||
OEMCryptoResult sts = OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
||||
if (!params.is_encrypted) {
|
||||
if (!params.is_encrypted &&
|
||||
params.subsample_flags ==
|
||||
(OEMCrypto_FirstSubsample | OEMCrypto_LastSubsample)) {
|
||||
sts = OEMCrypto_CopyBuffer(requested_security_level_,
|
||||
params.encrypt_buffer, params.encrypt_length,
|
||||
&buffer_descriptor, params.subsample_flags);
|
||||
|
||||
Reference in New Issue
Block a user