Merge "MediaCodec: check for exceptions when creating crypto info"
This commit is contained in:
@@ -2432,13 +2432,12 @@ static void android_media_MediaCodec_native_queueLinearBlock(
|
|||||||
throwExceptionAsNecessary(env, BAD_VALUE);
|
throwExceptionAsNecessary(env, BAD_VALUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NativeCryptoInfo cryptoInfo = [env, cryptoInfoObj, size]{
|
auto cryptoInfo =
|
||||||
if (cryptoInfoObj == nullptr) {
|
cryptoInfoObj ? NativeCryptoInfo{size} : NativeCryptoInfo{env, cryptoInfoObj};
|
||||||
return NativeCryptoInfo{size};
|
if (env->ExceptionCheck()) {
|
||||||
} else {
|
// Creation of cryptoInfo failed. Let the exception bubble up.
|
||||||
return NativeCryptoInfo{env, cryptoInfoObj};
|
return;
|
||||||
}
|
}
|
||||||
}();
|
|
||||||
err = codec->queueEncryptedLinearBlock(
|
err = codec->queueEncryptedLinearBlock(
|
||||||
index,
|
index,
|
||||||
memory,
|
memory,
|
||||||
|
|||||||
Reference in New Issue
Block a user