summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-05-01 01:32:46 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-01 01:32:46 +0000
commit6dc2c89b49c5549c27a22111db7d4ec1b4827e86 (patch)
treec67065673a08679e7b42c5ce8911ff82732f454b /media
parentab5ed9d2b63210d4b5132d3cf26b19f82e9dbd74 (diff)
parent0385dc8d12088d98ab76de86db4cd8e1ffa34af7 (diff)
downloadframeworks_base-6dc2c89b49c5549c27a22111db7d4ec1b4827e86.zip
frameworks_base-6dc2c89b49c5549c27a22111db7d4ec1b4827e86.tar.gz
frameworks_base-6dc2c89b49c5549c27a22111db7d4ec1b4827e86.tar.bz2
am 0385dc8d: am 1d8aae3b: am db672b03: Merge "Change how Java Bitmaps are accessed in a few places" into mnc-dev
* commit '0385dc8d12088d98ab76de86db4cd8e1ffa34af7': Change how Java Bitmaps are accessed in a few places
Diffstat (limited to 'media')
-rw-r--r--media/jni/android_media_MediaMetadataRetriever.cpp9
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) {