From 1ee2a02ee471d8c5d7b3c3bd3ab720f3dcfea056 Mon Sep 17 00:00:00 2001 From: Shivaprasad Hongal Date: Thu, 30 Jul 2015 18:00:18 -0700 Subject: Stagefright: Enable custom allocation mode. Enable custom allocation mode Change-Id: Idf3f6c0eb9d17d361d2e5b6c36b1fe7586236565 --- media/libmedia/ICrypto.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'media/libmedia/ICrypto.cpp') diff --git a/media/libmedia/ICrypto.cpp b/media/libmedia/ICrypto.cpp index 9f65bde..f80357f 100644 --- a/media/libmedia/ICrypto.cpp +++ b/media/libmedia/ICrypto.cpp @@ -24,6 +24,7 @@ #include #include #include +#include namespace android { @@ -136,6 +137,7 @@ struct BpCrypto : public BpInterface { if (secure) { data.writeInt64(static_cast(reinterpret_cast(dstPtr))); + AVMediaUtils::get()->writeCustomData(&data, dstPtr); } remote()->transact(DECRYPT, data, &reply); @@ -297,6 +299,7 @@ status_t BnCrypto::onTransact( void *secureBufferId, *dstPtr; if (secure) { secureBufferId = reinterpret_cast(static_cast(data.readInt64())); + AVMediaUtils::get()->readCustomData(&data, &secureBufferId); } else { dstPtr = malloc(totalSize); CHECK(dstPtr != NULL); @@ -332,6 +335,8 @@ status_t BnCrypto::onTransact( } free(dstPtr); dstPtr = NULL; + } else { + AVMediaUtils::get()->closeFileDescriptor(dstPtr); } delete[] subSamples; -- cgit v1.1