diff options
author | Andreas Huber <andih@google.com> | 2012-04-18 15:59:43 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-04-18 15:59:43 -0700 |
commit | ab57d03bdb3010d4957fb88c8acb30575ca02ec9 (patch) | |
tree | cf7bd81e5548da2a5c21c247a0819e6246d56c0a /media/jni | |
parent | 54ffee751c44c212ee02ef848f7c3e1cfcce66b7 (diff) | |
download | frameworks_base-ab57d03bdb3010d4957fb88c8acb30575ca02ec9.zip frameworks_base-ab57d03bdb3010d4957fb88c8acb30575ca02ec9.tar.gz frameworks_base-ab57d03bdb3010d4957fb88c8acb30575ca02ec9.tar.bz2 |
Fix a typo and choose a reasonable default for crypto-mode (0 would be unencrypted)
Change-Id: Ia46a7d7dd405bd569f319a64e43123d802c867d3
related-to-bug: 6275919
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaExtractor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/jni/android_media_MediaExtractor.cpp b/media/jni/android_media_MediaExtractor.cpp index adf0e66..bf3d44a 100644 --- a/media/jni/android_media_MediaExtractor.cpp +++ b/media/jni/android_media_MediaExtractor.cpp @@ -25,6 +25,7 @@ #include "jni.h" #include "JNIHelp.h" +#include <media/hardware/CryptoAPI.h> #include <media/stagefright/foundation/ABuffer.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> @@ -437,7 +438,7 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo( size_t encSize = size; jintArray numBytesOfPlainDataObj = NULL; - if (meta->findData(kKeyEncryptedSizes, &type, &data, &size)) { + if (meta->findData(kKeyPlainSizes, &type, &data, &size)) { if (size != encSize) { // The two must be of the same length. return false; @@ -485,7 +486,7 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo( int32_t mode; if (!meta->findInt32(kKeyCryptoMode, &mode)) { - mode = 0; + mode = CryptoPlugin::kMode_AES_CTR; } env->CallVoidMethod( |