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

Commit e78a747d authored by Narayan Kamath's avatar Narayan Kamath Committed by Android Git Automerger
Browse files

am f7a6fe95: am 0425a51b: am 51ec4ec5: am 5de03b18: Merge "Don\'t assume that size_t is 32-bit"

* commit 'f7a6fe95':
  Don't assume that size_t is 32-bit
parents 6ae7cd06 f7a6fe95
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo(
        return JNI_FALSE;
    }

    size_t numSubSamples = size / sizeof(size_t);
    size_t numSubSamples = size / sizeof(int32_t);

    if (numSubSamples == 0) {
        return JNI_FALSE;
@@ -571,7 +571,7 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo(
    jboolean isCopy;
    jint *dst = env->GetIntArrayElements(numBytesOfEncryptedDataObj, &isCopy);
    for (size_t i = 0; i < numSubSamples; ++i) {
        dst[i] = ((const size_t *)data)[i];
        dst[i] = ((const int32_t *)data)[i];
    }
    env->ReleaseIntArrayElements(numBytesOfEncryptedDataObj, dst, 0);
    dst = NULL;
@@ -588,7 +588,7 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo(
        jboolean isCopy;
        jint *dst = env->GetIntArrayElements(numBytesOfPlainDataObj, &isCopy);
        for (size_t i = 0; i < numSubSamples; ++i) {
            dst[i] = ((const size_t *)data)[i];
            dst[i] = ((const int32_t *)data)[i];
        }
        env->ReleaseIntArrayElements(numBytesOfPlainDataObj, dst, 0);
        dst = NULL;