summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-09-25 18:31:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-25 18:31:50 +0000
commit3e07240000ed8df9f77733962850ee4ddbea0c7f (patch)
treed9e661821f7e94b99f731153073f4069e760389d /media
parentc81633f483b2e75962800a4dde2a0eec779b0ad0 (diff)
parentf74023f0fbd35b4e9382703dd34c14b440f3da43 (diff)
downloadframeworks_av-3e07240000ed8df9f77733962850ee4ddbea0c7f.zip
frameworks_av-3e07240000ed8df9f77733962850ee4ddbea0c7f.tar.gz
frameworks_av-3e07240000ed8df9f77733962850ee4ddbea0c7f.tar.bz2
am f74023f0: Merge "stagefright: return encrypted input buffer for secure codecs" into lmp-dev
* commit 'f74023f0fbd35b4e9382703dd34c14b440f3da43': stagefright: return encrypted input buffer for secure codecs
Diffstat (limited to 'media')
-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;
}
}