OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e9f7f7
)
stagefright: return encrypted input buffer for secure codecs
author
Lajos Molnar
<lajos@google.com>
Wed, 24 Sep 2014 00:49:02 +0000
(17:49 -0700)
committer
Lajos Molnar
<lajos@google.com>
Wed, 24 Sep 2014 00:55:40 +0000
(17:55 -0700)
Bug:
17630446
Change-Id: I8a9352bcd00a3f4eb6fd2797d6809a8c1edc8482
media/libstagefright/MediaCodec.cpp
patch
|
blob
|
history
diff --git
a/media/libstagefright/MediaCodec.cpp
b/media/libstagefright/MediaCodec.cpp
index
6c98c52
..
b56819c
100644
(file)
--- 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;
}
}