diff options
author | Lajos Molnar <lajos@google.com> | 2014-09-24 23:48:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-24 23:48:23 +0000 |
commit | f74023f0fbd35b4e9382703dd34c14b440f3da43 (patch) | |
tree | 54a2f1111f1018238f0ffe79147092c71247a3ce /media/libstagefright | |
parent | 846202f5483c30ff380fc997c7d4461cce090098 (diff) | |
parent | 0837d0ac1b572923a27f1b0b742960fc64a6b162 (diff) | |
download | frameworks_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.cpp | 7 |
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; } } |