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

Commit b3fc6efa authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fail gracefully instead of CHECKing

Bug: 122894106
Test: manual
Change-Id: Ia3c40815bfb8dd64eeb8cbeb082c601a2015877b
parent 8c461da1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4868,7 +4868,9 @@ status_t MPEG4Source::parseClearEncryptedSizes(
        off64_t offset, bool isSubsampleEncryption, uint32_t flags) {

    int32_t ivlength;
    CHECK(AMediaFormat_getInt32(mFormat, AMEDIAFORMAT_KEY_CRYPTO_DEFAULT_IV_SIZE, &ivlength));
    if (!AMediaFormat_getInt32(mFormat, AMEDIAFORMAT_KEY_CRYPTO_DEFAULT_IV_SIZE, &ivlength)) {
        return ERROR_MALFORMED;
    }

    // only 0, 8 and 16 byte initialization vectors are supported
    if (ivlength != 0 && ivlength != 8 && ivlength != 16) {