summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-09-24 23:48:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-24 23:48:23 +0000
commitf74023f0fbd35b4e9382703dd34c14b440f3da43 (patch)
tree54a2f1111f1018238f0ffe79147092c71247a3ce /media/libstagefright
parent846202f5483c30ff380fc997c7d4461cce090098 (diff)
parent0837d0ac1b572923a27f1b0b742960fc64a6b162 (diff)
downloadframeworks_av-f74023f0fbd35b4e9382703dd34c14b440f3da43.zip
frameworks_av-f74023f0fbd35b4e9382703dd34c14b440f3da43.tar.gz
frameworks_av-f74023f0fbd35b4e9382703dd34c14b440f3da43.tar.bz2
Merge "stagefright: return encrypted input buffer for secure codecs" into lmp-dev
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/MediaCodec.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index 6c98c52..b56819c 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -589,7 +589,12 @@ status_t MediaCodec::getBufferAndFormat(
if (index < buffers->size()) {
const BufferInfo &info = buffers->itemAt(index);
if (info.mOwnedByClient) {
- *buffer = info.mData;
+ // by the time buffers array is initialized, crypto is set
+ if (portIndex == kPortIndexInput && mCrypto != NULL) {
+ *buffer = info.mEncryptedData;
+ } else {
+ *buffer = info.mData;
+ }
*format = info.mFormat;
}
}