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

Commit 6ca7e5d7 authored by Robert Shih's avatar Robert Shih Committed by Android (Google) Code Review
Browse files

Merge "NuPlayerDrm: explicitly use 32-bit subsample sizes" into tm-qpr-dev

parents 87d7226b 8dccd0c8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -191,8 +191,8 @@ NuPlayerDrm::CryptoInfo *NuPlayerDrm::makeCryptoInfo(
        uint8_t key[kBlockSize],
        uint8_t iv[kBlockSize],
        CryptoPlugin::Mode mode,
        size_t *clearbytes,
        size_t *encryptedbytes)
        uint32_t *clearbytes,
        uint32_t *encryptedbytes)
{
    // size needed to store all the crypto data
    size_t cryptosize;
@@ -236,7 +236,7 @@ NuPlayerDrm::CryptoInfo *NuPlayerDrm::getSampleCryptoInfo(MetaDataBase &meta)
    if (!meta.findData(kKeyEncryptedSizes, &type, &crypteddata, &cryptedsize)) {
        return NULL;
    }
    size_t numSubSamples = cryptedsize / sizeof(size_t);
    size_t numSubSamples = cryptedsize / sizeof(uint32_t);

    if (numSubSamples <= 0) {
        ALOGE("getSampleCryptoInfo INVALID numSubSamples: %zu", numSubSamples);
@@ -285,8 +285,8 @@ NuPlayerDrm::CryptoInfo *NuPlayerDrm::getSampleCryptoInfo(MetaDataBase &meta)
            (uint8_t*) key,
            (uint8_t*) iv,
            (CryptoPlugin::Mode)mode,
            (size_t*) cleardata,
            (size_t*) crypteddata);
            (uint32_t*) cleardata,
            (uint32_t*) crypteddata);
}

}   // namespace android
+2 −2
Original line number Diff line number Diff line
@@ -106,8 +106,8 @@ namespace android {
                uint8_t key[kBlockSize],
                uint8_t iv[kBlockSize],
                CryptoPlugin::Mode mode,
                size_t *clearbytes,
                size_t *encryptedbytes);
                uint32_t *clearbytes,
                uint32_t *encryptedbytes);

        static CryptoInfo *getSampleCryptoInfo(MetaDataBase &meta);