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

Commit ac3cd753 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Moving CryptoInfo creation for Unencrypted samples" into main am: bc05bdbb am: 52dfe53a

parents 6dc9a278 52dfe53a
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.