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

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

Merge "MediaCodec: check for exceptions when creating crypto info" am:...

Merge "MediaCodec: check for exceptions when creating crypto info" am: 2f222457 am: b03acdec am: eb3cb40d

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2281605



Change-Id: Ib3248c9a33a07fde31df65d98f31c026f05f86bd
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents adc98d06 eb3cb40d
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -2432,13 +2432,12 @@ static void android_media_MediaCodec_native_queueLinearBlock(
            throwExceptionAsNecessary(env, BAD_VALUE);
            return;
        }
        NativeCryptoInfo cryptoInfo = [env, cryptoInfoObj, size]{
            if (cryptoInfoObj == nullptr) {
                return NativeCryptoInfo{size};
            } else {
                return NativeCryptoInfo{env, cryptoInfoObj};
        auto cryptoInfo =
                cryptoInfoObj ? NativeCryptoInfo{size} : NativeCryptoInfo{env, cryptoInfoObj};
        if (env->ExceptionCheck()) {
            // Creation of cryptoInfo failed. Let the exception bubble up.
            return;
        }
        }();
        err = codec->queueEncryptedLinearBlock(
                index,
                memory,