diff options
author | Ashok Bhat <ashok.bhat@arm.com> | 2014-03-04 21:13:52 +0000 |
---|---|---|
committer | Ashok Bhat <ashok.bhat@arm.com> | 2014-03-06 11:33:20 +0000 |
commit | 58fad0bf141109f1aed820f4d57985c116e05b61 (patch) | |
tree | 70b75126205a465548a1213cf7c47bf66a57dcc2 | |
parent | 2383f2200ab0c2dbd71708b5c1fb6af98db408fa (diff) | |
download | frameworks_base-58fad0bf141109f1aed820f4d57985c116e05b61.zip frameworks_base-58fad0bf141109f1aed820f4d57985c116e05b61.tar.gz frameworks_base-58fad0bf141109f1aed820f4d57985c116e05b61.tar.bz2 |
Don't use size_t for variables that store uint32_t value
The local variables width, height, displayWidth and
displayHeight are set to the corresponding members
of VideoFrame class. As the members of VideoFrame are
uint32_t, the local variables have been changed to
uint32_t.
As these local variables are passed to a java method,
the change of size_t to uint32_t ensures that the size
of the actual parameter (i.e uint32_t) is now same as
the size of the formal parameter (i.e. jint) for all
platforms.
Change-Id: Icd14de0142bfd4e6ba52a3e6aff3d80b323a0de4
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
-rw-r--r-- | media/jni/android_media_MediaMetadataRetriever.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp index a52b24d..6176f0f 100644 --- a/media/jni/android_media_MediaMetadataRetriever.cpp +++ b/media/jni/android_media_MediaMetadataRetriever.cpp @@ -245,7 +245,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env, fields.createConfigMethod, SkBitmap::kRGB_565_Config); - size_t width, height; + uint32_t width, height; bool swapWidthAndHeight = false; if (videoFrame->mRotationAngle == 90 || videoFrame->mRotationAngle == 270) { width = videoFrame->mHeight; @@ -276,8 +276,8 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env, if (videoFrame->mDisplayWidth != videoFrame->mWidth || videoFrame->mDisplayHeight != videoFrame->mHeight) { - size_t displayWidth = videoFrame->mDisplayWidth; - size_t displayHeight = videoFrame->mDisplayHeight; + uint32_t displayWidth = videoFrame->mDisplayWidth; + uint32_t displayHeight = videoFrame->mDisplayHeight; if (swapWidthAndHeight) { displayWidth = videoFrame->mDisplayHeight; displayHeight = videoFrame->mDisplayWidth; |