package com.google.android.gms.internal.ads;

import android.media.MediaCodec;
import androidx.annotation.Nullable;

/* JADX INFO: loaded from: classes2.dex */
public final class mc2 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f14072a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f14073b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f14074c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f14075d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final MediaCodec.CryptoInfo f14076e;

    @Nullable
    public byte[] zza;

    @Nullable
    public byte[] zzb;

    @Nullable
    public int[] zzd;

    @Nullable
    public int[] zze;

    @Nullable
    private final ub2 zzj;

    public mc2() {
        MediaCodec.CryptoInfo cryptoInfo = new MediaCodec.CryptoInfo();
        this.f14076e = cryptoInfo;
        this.zzj = new ub2(cryptoInfo);
    }

    public final void a(int i10, int[] iArr, int[] iArr2, byte[] bArr, byte[] bArr2, int i11, int i12, int i13) {
        this.f14073b = i10;
        this.zzd = iArr;
        this.zze = iArr2;
        this.zzb = bArr;
        this.zza = bArr2;
        this.f14072a = i11;
        this.f14074c = i12;
        this.f14075d = i13;
        MediaCodec.CryptoInfo cryptoInfo = this.f14076e;
        cryptoInfo.numSubSamples = i10;
        cryptoInfo.numBytesOfClearData = iArr;
        cryptoInfo.numBytesOfEncryptedData = iArr2;
        cryptoInfo.key = bArr;
        cryptoInfo.iv = bArr2;
        cryptoInfo.mode = i11;
        ub2 ub2Var = this.zzj;
        ub2Var.getClass();
        MediaCodec.CryptoInfo.Pattern pattern = ub2Var.f17203b;
        pattern.set(i12, i13);
        ub2Var.f17202a.setPattern(pattern);
    }

    public final void b(int i10) {
        if (i10 == 0) {
            return;
        }
        if (this.zzd == null) {
            int[] iArr = new int[1];
            this.zzd = iArr;
            this.f14076e.numBytesOfClearData = iArr;
        }
        int[] iArr2 = this.zzd;
        iArr2[0] = iArr2[0] + i10;
    }
}
