Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58fad0bf authored by Ashok Bhat's avatar Ashok Bhat
Browse files

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: default avatarAshok Bhat <ashok.bhat@arm.com>
parent 2383f220
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;