diff options
author | John Reck <jreck@google.com> | 2015-04-30 21:20:51 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-30 21:20:51 +0000 |
commit | 0385dc8d12088d98ab76de86db4cd8e1ffa34af7 (patch) | |
tree | 51a72ec43396f919149f278e526e28d87410a8ee /media | |
parent | c9122d6fe29411eb02e91c7713a450aba94b65e3 (diff) | |
parent | 1d8aae3b1924b2340250bdffe491819a26eea5fe (diff) | |
download | frameworks_base-0385dc8d12088d98ab76de86db4cd8e1ffa34af7.zip frameworks_base-0385dc8d12088d98ab76de86db4cd8e1ffa34af7.tar.gz frameworks_base-0385dc8d12088d98ab76de86db4cd8e1ffa34af7.tar.bz2 |
am 1d8aae3b: am db672b03: Merge "Change how Java Bitmaps are accessed in a few places" into mnc-dev
* commit '1d8aae3b1924b2340250bdffe491819a26eea5fe':
Change how Java Bitmaps are accessed in a few places
Diffstat (limited to 'media')
-rw-r--r-- | media/jni/android_media_MediaMetadataRetriever.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp index 88a6771..59fb6d6 100644 --- a/media/jni/android_media_MediaMetadataRetriever.cpp +++ b/media/jni/android_media_MediaMetadataRetriever.cpp @@ -299,15 +299,16 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env, return NULL; } - SkBitmap *bitmap = GraphicsJNI::getSkBitmap(env, jBitmap); + SkBitmap bitmap; + GraphicsJNI::getSkBitmap(env, jBitmap, &bitmap); - bitmap->lockPixels(); - rotate((uint16_t*)bitmap->getPixels(), + bitmap.lockPixels(); + rotate((uint16_t*)bitmap.getPixels(), (uint16_t*)((char*)videoFrame + sizeof(VideoFrame)), videoFrame->mWidth, videoFrame->mHeight, videoFrame->mRotationAngle); - bitmap->unlockPixels(); + bitmap.unlockPixels(); if (videoFrame->mDisplayWidth != videoFrame->mWidth || videoFrame->mDisplayHeight != videoFrame->mHeight) { |