diff options
author | Lajos Molnar <lajos@google.com> | 2014-09-25 18:31:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-25 18:31:50 +0000 |
commit | 3e07240000ed8df9f77733962850ee4ddbea0c7f (patch) | |
tree | d9e661821f7e94b99f731153073f4069e760389d /media | |
parent | c81633f483b2e75962800a4dde2a0eec779b0ad0 (diff) | |
parent | f74023f0fbd35b4e9382703dd34c14b440f3da43 (diff) | |
download | frameworks_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.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; } } |