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

Commit b2fb3c97 authored by Edwin Wong's avatar Edwin Wong
Browse files

Fix AMediaExtractor_getSampleCryptoInfo returning iv as key.

There is a typo such that iv is returned as the crypto key in
the AMediaCodecCryptoInfo object.

kKeyCryptoKey should replace kKeyCryptoIV when searching for
the crypto key in the meta data.

bug: 31158746
Change-Id: I68c266b69fdb801b2b1182bbffe9a31cab7be6ce
parent 790a227c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -343,9 +343,9 @@ AMediaCodecCryptoInfo *AMediaExtractor_getSampleCryptoInfo(AMediaExtractor *ex)

    const void *key;
    size_t keysize;
    if (meta->findData(kKeyCryptoIV, &type, &key, &keysize)) {
    if (meta->findData(kKeyCryptoKey, &type, &key, &keysize)) {
        if (keysize != 16) {
            // IVs must be 16 bytes in length.
            // Keys must be 16 bytes in length.
            return NULL;
        }
    }