Fixed mediacodec mode's fatal error when eos is encountered.
The FATAL EXCEPTION is caused by the decrypt function returning -EINVAL when OEMCrypto decrypt returns an error. The fix is not to call OEMCrypto decrypt when eos is reached. related-to-bug: 7216928 related-to-bug: 7217609 Change-Id: I8f006905386e2cdfb907d4ab15c766ae69f20f00 Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
committed by
Iliyan Malchev
parent
4e3efb415b
commit
4fffa0ff6a
@@ -120,6 +120,9 @@ ssize_t WVCryptoPlugin::decrypt(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ALOGD("size[%d]=%d", i, srcSize);
|
//ALOGD("size[%d]=%d", i, srcSize);
|
||||||
|
if (srcSize == 0) {
|
||||||
|
continue; // segment size is zero, do not call decrypt
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef REQUIRE_SECURE_BUFFERS
|
#ifdef REQUIRE_SECURE_BUFFERS
|
||||||
// decrypt using OEMCrypto API, used for L1 devices
|
// decrypt using OEMCrypto API, used for L1 devices
|
||||||
|
|||||||
Reference in New Issue
Block a user