summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodec.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-09-25 18:42:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-25 18:42:29 +0000
commit37acc9a2ea028c5dad1c6ea744d6727f6b802501 (patch)
tree8b63a3bd62a0e357fa59937ebe299ec6909dea93 /media/libstagefright/MediaCodec.cpp
parent9f57f923fb46cb51aba3d29bfa74cb08aa542e17 (diff)
parent3e07240000ed8df9f77733962850ee4ddbea0c7f (diff)
downloadframeworks_av-37acc9a2ea028c5dad1c6ea744d6727f6b802501.zip
frameworks_av-37acc9a2ea028c5dad1c6ea744d6727f6b802501.tar.gz
frameworks_av-37acc9a2ea028c5dad1c6ea744d6727f6b802501.tar.bz2
am 3e072400: am f74023f0: Merge "stagefright: return encrypted input buffer for secure codecs" into lmp-dev
* commit '3e07240000ed8df9f77733962850ee4ddbea0c7f': stagefright: return encrypted input buffer for secure codecs
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-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 619e6df..cb461f8 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -599,7 +599,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;
}
}