diff options
author | Lajos Molnar <lajos@google.com> | 2014-09-23 17:49:02 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-09-23 17:55:40 -0700 |
commit | 0837d0ac1b572923a27f1b0b742960fc64a6b162 (patch) | |
tree | a552081ec85254e98ea22091904ae359928c2b30 /media | |
parent | 7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad (diff) | |
download | frameworks_av-0837d0ac1b572923a27f1b0b742960fc64a6b162.zip frameworks_av-0837d0ac1b572923a27f1b0b742960fc64a6b162.tar.gz frameworks_av-0837d0ac1b572923a27f1b0b742960fc64a6b162.tar.bz2 |
stagefright: return encrypted input buffer for secure codecs
Bug: 17630446
Change-Id: I8a9352bcd00a3f4eb6fd2797d6809a8c1edc8482
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; } } |