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

Commit bc05bdbb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Moving CryptoInfo creation for Unencrypted samples" into main

parents 3698d67d a7a04b56
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -2999,18 +2999,15 @@ static void android_media_MediaCodec_native_queueLinearBlock(
                    "MediaCodec.LinearBlock#obtain method to obtain a compatible buffer.");
            return;
        }
        sp<CryptoInfosWrapper> cryptoInfos = new CryptoInfosWrapper{decltype(cryptoInfos->value)()};
        jint sampleSize = 0;
        sp<CryptoInfosWrapper> cryptoInfos = nullptr;
        jint sampleSize = totalSize;
        if (cryptoInfoArray != nullptr) {
            cryptoInfos = new CryptoInfosWrapper{decltype(cryptoInfos->value)()};
            extractCryptoInfosFromObjectArray(env,
                    &sampleSize,
                    &cryptoInfos->value,
                    cryptoInfoArray,
                    &errorDetailMsg);
        } else {
            sampleSize = totalSize;
            std::unique_ptr<CodecCryptoInfo> cryptoInfo{new MediaCodecCryptoInfo(totalSize)};
            cryptoInfos->value.push_back(std::move(cryptoInfo));
        }
        if (env->ExceptionCheck()) {
            // Creation of cryptoInfo failed. Let the exception bubble up.