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

Commit da8620b7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make the output CryptoInfo.iv non-null" into rvc-dev

parents fe1d660c b5210274
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -880,6 +880,7 @@ public final class MediaParser {
    private static final String TS_MODE_MULTI_PMT = "multi_pmt";
    private static final String TS_MODE_HLS = "hls";
    private static final int BYTES_PER_SUBSAMPLE_ENCRYPTION_ENTRY = 6;
    private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];

    @IntDef(
            value = {
@@ -1674,6 +1675,9 @@ public final class MediaParser {
                if (cryptoData != mLastReceivedCryptoData) {
                    mLastOutputCryptoInfo =
                            createNewCryptoInfoAndPopulateWithCryptoData(cryptoData);
                    // We are using in-band crypto info, so the IV will be ignored. But we prevent
                    // it from being null because toString assumes it non-null.
                    mLastOutputCryptoInfo.iv = EMPTY_BYTE_ARRAY;
                }
            } else /* We must populate the full CryptoInfo. */ {
                // CryptoInfo.pattern is not accessible to the user, so the user needs to feed