diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/ICrypto.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libmedia/ICrypto.cpp b/media/libmedia/ICrypto.cpp index 2defc2d..00c500a 100644 --- a/media/libmedia/ICrypto.cpp +++ b/media/libmedia/ICrypto.cpp @@ -131,7 +131,7 @@ struct BpCrypto : public BpInterface<ICrypto> { data.write(subSamples, sizeof(CryptoPlugin::SubSample) * numSubSamples); if (secure) { - data.writeIntPtr((intptr_t)dstPtr); + data.writeInt64(static_cast<uint64_t>(reinterpret_cast<uintptr_t>(dstPtr))); } remote()->transact(DECRYPT, data, &reply); @@ -247,9 +247,9 @@ status_t BnCrypto::onTransact( subSamples, sizeof(CryptoPlugin::SubSample) * numSubSamples); - void *dstPtr; + void *secureBufferId, *dstPtr; if (secure) { - dstPtr = (void *)data.readIntPtr(); + secureBufferId = reinterpret_cast<void *>(static_cast<uintptr_t>(data.readInt64())); } else { dstPtr = malloc(totalSize); } @@ -262,7 +262,7 @@ status_t BnCrypto::onTransact( mode, srcData, subSamples, numSubSamples, - dstPtr, + secure ? secureBufferId : dstPtr, &errorDetailMsg); reply->writeInt32(result); |