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

import android.util.Pair;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/* JADX INFO: loaded from: classes2.dex */
public final class f6 {
    public int A;
    public int B;
    public int C;
    public int D;
    public int E;
    public float F;
    public float G;
    public float H;
    public float I;
    public float J;
    public float K;
    public float L;
    public float M;
    public float N;
    public float O;
    public byte[] P;
    public int Q;
    public int R;
    public int S;
    public long T;
    public long U;
    public v3 V;
    public boolean W;
    public boolean X;
    public boolean Y;
    public String Z;

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

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    public u3 f11045a0;

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

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    public zn2 f11047b0;

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public boolean f11055i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public byte[] f11056j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public t3 f11057k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public byte[] f11058l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public uk2 f11059m;

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public float f11067u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public float f11068v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public float f11069w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public byte[] f11070x;

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

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public boolean f11072z;

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    /* JADX WARN: Removed duplicated region for block: B:107:0x0198  */
    /* JADX WARN: Removed duplicated region for block: B:254:0x0529  */
    /* JADX WARN: Removed duplicated region for block: B:259:0x0541  */
    /* JADX WARN: Removed duplicated region for block: B:260:0x0544  */
    /* JADX WARN: Removed duplicated region for block: B:263:0x0553  */
    /* JADX WARN: Removed duplicated region for block: B:264:0x055f  */
    /* JADX WARN: Removed duplicated region for block: B:333:0x06d4  */
    /* JADX WARN: Removed duplicated region for block: B:352:0x071f  */
    /* JADX WARN: Removed duplicated region for block: B:357:0x0736  */
    /* JADX WARN: Removed duplicated region for block: B:358:0x0739  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void a(int i10) {
        byte b10;
        String str;
        int i11;
        List list;
        List list2;
        Pair pair;
        List list3;
        ArrayList arrayList;
        List list4;
        List list5;
        sm2 sm2Var;
        int iIntValue;
        ea2 ea2VarA;
        byte[] bArr;
        int i12;
        String str2;
        xe1 xe1VarZza;
        List list6;
        String str3 = this.f11048c;
        int iV = 4;
        int i13 = 0;
        switch (str3.hashCode()) {
            case -2095576542:
                b10 = !str3.equals("V_MPEG4/ISO/AP") ? (byte) -1 : (byte) 6;
                break;
            case -2095575984:
                if (str3.equals("V_MPEG4/ISO/SP")) {
                    b10 = 4;
                    break;
                }
                break;
            case -1985379776:
                if (str3.equals("A_MS/ACM")) {
                    b10 = 23;
                    break;
                }
                break;
            case -1784763192:
                if (str3.equals("A_TRUEHD")) {
                    b10 = 18;
                    break;
                }
                break;
            case -1730367663:
                if (str3.equals("A_VORBIS")) {
                    b10 = 11;
                    break;
                }
                break;
            case -1482641358:
                if (str3.equals("A_MPEG/L2")) {
                    b10 = 14;
                    break;
                }
                break;
            case -1482641357:
                if (str3.equals("A_MPEG/L3")) {
                    b10 = 15;
                    break;
                }
                break;
            case -1373388978:
                if (str3.equals("V_MS/VFW/FOURCC")) {
                    b10 = 9;
                    break;
                }
                break;
            case -933872740:
                if (str3.equals("S_DVBSUB")) {
                    b10 = 33;
                    break;
                }
                break;
            case -538363189:
                if (str3.equals("V_MPEG4/ISO/ASP")) {
                    b10 = 5;
                    break;
                }
                break;
            case -538363109:
                if (str3.equals("V_MPEG4/ISO/AVC")) {
                    b10 = 7;
                    break;
                }
                break;
            case -425012669:
                if (str3.equals("S_VOBSUB")) {
                    b10 = 31;
                    break;
                }
                break;
            case -356037306:
                if (str3.equals("A_DTS/LOSSLESS")) {
                    b10 = 21;
                    break;
                }
                break;
            case 62923557:
                if (str3.equals("A_AAC")) {
                    b10 = 13;
                    break;
                }
                break;
            case 62923603:
                if (str3.equals("A_AC3")) {
                    b10 = 16;
                    break;
                }
                break;
            case 62927045:
                if (str3.equals("A_DTS")) {
                    b10 = 19;
                    break;
                }
                break;
            case 82318131:
                if (str3.equals("V_AV1")) {
                    b10 = 2;
                    break;
                }
                break;
            case 82338133:
                if (str3.equals("V_VP8")) {
                    b10 = 0;
                    break;
                }
                break;
            case 82338134:
                if (str3.equals("V_VP9")) {
                    b10 = 1;
                    break;
                }
                break;
            case 99146302:
                if (str3.equals("S_HDMV/PGS")) {
                    b10 = 32;
                    break;
                }
                break;
            case 444813526:
                if (str3.equals("V_THEORA")) {
                    b10 = 10;
                    break;
                }
                break;
            case 542569478:
                if (str3.equals("A_DTS/EXPRESS")) {
                    b10 = 20;
                    break;
                }
                break;
            case 635596514:
                if (str3.equals("A_PCM/FLOAT/IEEE")) {
                    b10 = 26;
                    break;
                }
                break;
            case 725948237:
                if (str3.equals("A_PCM/INT/BIG")) {
                    b10 = 25;
                    break;
                }
                break;
            case 725957860:
                if (str3.equals("A_PCM/INT/LIT")) {
                    b10 = 24;
                    break;
                }
                break;
            case 738597099:
                if (str3.equals("S_TEXT/ASS")) {
                    b10 = 28;
                    break;
                }
                break;
            case 738614379:
                if (str3.equals("S_TEXT/SSA")) {
                    b10 = 29;
                    break;
                }
                break;
            case 855502857:
                if (str3.equals("V_MPEGH/ISO/HEVC")) {
                    b10 = 8;
                    break;
                }
                break;
            case 1045209816:
                if (str3.equals("S_TEXT/WEBVTT")) {
                    b10 = 30;
                    break;
                }
                break;
            case 1422270023:
                if (str3.equals("S_TEXT/UTF8")) {
                    b10 = 27;
                    break;
                }
                break;
            case 1809237540:
                if (str3.equals("V_MPEG2")) {
                    b10 = 3;
                    break;
                }
                break;
            case 1950749482:
                if (str3.equals("A_EAC3")) {
                    b10 = 17;
                    break;
                }
                break;
            case 1950789798:
                if (str3.equals("A_FLAC")) {
                    b10 = 22;
                    break;
                }
                break;
            case 1951062397:
                if (str3.equals("A_OPUS")) {
                    b10 = 12;
                    break;
                }
                break;
        }
        String str4 = MimeTypes.VIDEO_UNKNOWN;
        int i14 = 4096;
        switch (b10) {
            case 0:
                str4 = MimeTypes.VIDEO_VP8;
                list3 = null;
                str = null;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null && (xe1VarZza = xe1.zza(new p01(this.P))) != null) {
                    str = xe1VarZza.f18423a;
                    str4 = MimeTypes.VIDEO_DOLBY_VISION;
                }
                int i15 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                    sm2Var.f16496s = this.Q;
                    sm2Var.f16497t = this.S;
                    sm2Var.f16498u = iV;
                } else if (hc.zzb(str4)) {
                    if (this.f11065s == 0) {
                        int i16 = this.f11063q;
                        iIntValue = -1;
                        if (i16 == -1) {
                            i16 = this.f11060n;
                        }
                        this.f11063q = i16;
                        int i17 = this.f11064r;
                        if (i17 == -1) {
                            i17 = this.f11061o;
                        }
                        this.f11064r = i17;
                    } else {
                        iIntValue = -1;
                    }
                    float f10 = (this.f11063q == iIntValue || (i12 = this.f11064r) == iIntValue) ? -1.0f : (this.f11061o * r3) / (this.f11060n * i12);
                    if (this.f11072z) {
                        if (this.F == -1.0f || this.G == -1.0f || this.H == -1.0f || this.I == -1.0f || this.J == -1.0f || this.K == -1.0f || this.L == -1.0f || this.M == -1.0f || this.N == -1.0f || this.O == -1.0f) {
                            bArr = null;
                        } else {
                            bArr = new byte[25];
                            ByteBuffer byteBufferOrder = ByteBuffer.wrap(bArr).order(ByteOrder.LITTLE_ENDIAN);
                            byteBufferOrder.put((byte) 0);
                            byteBufferOrder.putShort((short) ((this.F * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.G * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.H * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.I * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.J * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.K * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.L * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) ((this.M * 50000.0f) + 0.5f));
                            byteBufferOrder.putShort((short) (this.N + 0.5f));
                            byteBufferOrder.putShort((short) (this.O + 0.5f));
                            byteBufferOrder.putShort((short) this.D);
                            byteBufferOrder.putShort((short) this.E);
                        }
                        fv1 fv1Var = new fv1();
                        fv1Var.f11401a = this.A;
                        fv1Var.f11402b = this.C;
                        fv1Var.f11403c = this.B;
                        fv1Var.zzd(bArr);
                        int i18 = this.f11062p;
                        fv1Var.f11404d = i18;
                        fv1Var.f11405e = i18;
                        ea2VarA = fv1Var.a();
                    } else {
                        ea2VarA = null;
                    }
                    String str5 = this.f11046b;
                    if (str5 != null) {
                        Map map = g6.f11499o0;
                        if (map.containsKey(str5)) {
                            iIntValue = ((Integer) map.get(this.f11046b)).intValue();
                        }
                    }
                    if (this.f11066t == 0 && Float.compare(this.f11067u, 0.0f) == 0 && Float.compare(this.f11068v, 0.0f) == 0) {
                        if (Float.compare(this.f11069w, 0.0f) != 0) {
                            if (Float.compare(this.f11069w, 90.0f) == 0) {
                                i13 = 90;
                            } else {
                                i13 = 180;
                                if (Float.compare(this.f11069w, -180.0f) != 0 && Float.compare(this.f11069w, 180.0f) != 0) {
                                    if (Float.compare(this.f11069w, -90.0f) == 0) {
                                        i13 = 270;
                                    }
                                }
                            }
                        }
                        sm2Var.f16487j = this.f11060n;
                        sm2Var.f16488k = this.f11061o;
                        sm2Var.f16493p = f10;
                        sm2Var.f16492o = i13;
                        sm2Var.zzA(this.f11070x);
                        sm2Var.f16494q = this.f11071y;
                        sm2Var.zzC(ea2VarA);
                    } else {
                        i13 = iIntValue;
                        sm2Var.f16487j = this.f11060n;
                        sm2Var.f16488k = this.f11061o;
                        sm2Var.f16493p = f10;
                        sm2Var.f16492o = i13;
                        sm2Var.zzA(this.f11070x);
                        sm2Var.f16494q = this.f11071y;
                        sm2Var.zzC(ea2VarA);
                    }
                } else if (!MimeTypes.APPLICATION_SUBRIP.equals(str4) && !MimeTypes.TEXT_SSA.equals(str4) && !MimeTypes.TEXT_VTT.equals(str4) && !MimeTypes.APPLICATION_VOBSUB.equals(str4) && !MimeTypes.APPLICATION_PGS.equals(str4) && !MimeTypes.APPLICATION_DVBSUBS.equals(str4)) {
                    throw zzat.zzb("Unexpected MIME type.", null);
                }
                str2 = this.f11046b;
                if (str2 != null && !g6.f11499o0.containsKey(str2)) {
                    sm2Var.zzc(this.f11046b);
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 1:
                byte[] bArr2 = this.f11058l;
                zzguf zzgufVarO = bArr2 == null ? null : zzguf.o(bArr2);
                str4 = MimeTypes.VIDEO_VP9;
                list2 = zzgufVarO;
                str = null;
                list3 = list2;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                    str = xe1VarZza.f18423a;
                    str4 = MimeTypes.VIDEO_DOLBY_VISION;
                }
                int i152 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                    sm2Var.zzc(this.f11046b);
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 2:
                byte[] bArr3 = this.f11058l;
                zzguf zzgufVarO2 = bArr3 == null ? null : zzguf.o(bArr3);
                str4 = MimeTypes.VIDEO_AV1;
                list2 = zzgufVarO2;
                str = null;
                list3 = list2;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 3:
                str4 = MimeTypes.VIDEO_MPEG2;
                list3 = null;
                str = null;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i15222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 4:
            case 5:
            case 6:
                byte[] bArr4 = this.f11058l;
                List listSingletonList = bArr4 == null ? null : Collections.singletonList(bArr4);
                str4 = MimeTypes.VIDEO_MP4V;
                list2 = listSingletonList;
                str = null;
                list3 = list2;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 7:
                z1 z1VarA = z1.a(new p01(b(this.f11048c)));
                this.f11049c0 = z1VarA.f19032b;
                str = z1VarA.zzl;
                List list7 = z1VarA.f19031a;
                str4 = MimeTypes.VIDEO_H264;
                list3 = list7;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 8:
                f3 f3VarA = f3.a(new p01(b(this.f11048c)));
                List list8 = f3VarA.f10996a;
                this.f11049c0 = f3VarA.f10997b;
                String str6 = f3VarA.zzn;
                str4 = MimeTypes.VIDEO_H265;
                i11 = -1;
                iV = -1;
                str = str6;
                list = list8;
                if (this.P != null) {
                }
                int i15222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 9:
                p01 p01Var = new p01(b(this.f11048c));
                try {
                    p01Var.E(16);
                    long jA = p01Var.a();
                    if (jA == 1482049860) {
                        pair = new Pair(MimeTypes.VIDEO_DIVX, null);
                    } else if (jA == 859189832) {
                        pair = new Pair(MimeTypes.VIDEO_H263, null);
                    } else if (jA == 826496599) {
                        int i19 = p01Var.f15226b + 20;
                        byte[] bArr5 = p01Var.f15225a;
                        while (true) {
                            int length = bArr5.length;
                            if (i19 >= length - 4) {
                                throw zzat.zzb("Failed to find FourCC VC1 initialization data", null);
                            }
                            int i20 = i19 + 1;
                            if (bArr5[i19] == 0 && bArr5[i20] == 0 && bArr5[i19 + 2] == 1) {
                                if (bArr5[i19 + 3] == 15) {
                                    pair = new Pair(MimeTypes.VIDEO_VC1, Collections.singletonList(Arrays.copyOfRange(bArr5, i19, length)));
                                }
                            }
                            i19 = i20;
                        }
                    } else {
                        vt0.c("Unknown FourCC. Setting mimeType to video/x-unknown");
                        pair = new Pair(MimeTypes.VIDEO_UNKNOWN, null);
                    }
                    str4 = (String) pair.first;
                    list2 = (List) pair.second;
                    str = null;
                    list3 = list2;
                    i11 = -1;
                    list6 = list3;
                    iV = -1;
                    list = list6;
                    if (this.P != null) {
                    }
                    int i152222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                    sm2Var = new sm2();
                    if (hc.zza(str4)) {
                    }
                    str2 = this.f11046b;
                    if (str2 != null) {
                    }
                    sm2Var.q(i10);
                    sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                    sm2Var.zzm(str4);
                    sm2Var.f16483f = i11;
                    sm2Var.zze(this.Z);
                    sm2Var.f16479b = i152222222;
                    sm2Var.zzp(list);
                    sm2Var.zzj(str);
                    sm2Var.zzq(this.f11059m);
                    this.f11047b0 = new zn2(sm2Var);
                    return;
                } catch (ArrayIndexOutOfBoundsException unused) {
                    throw zzat.zzb("Error parsing FourCC private data", null);
                }
            case 10:
                list3 = null;
                str = null;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 11:
                byte[] bArrB = b(str3);
                try {
                    if (bArrB[0] != 2) {
                        throw zzat.zzb("Error parsing vorbis codec private", null);
                    }
                    int i21 = 0;
                    int i22 = 1;
                    while (true) {
                        int i23 = bArrB[i22];
                        i22++;
                        int i24 = i23 & 255;
                        if (i24 == 255) {
                            i21 += 255;
                        } else {
                            int i25 = i21 + i24;
                            int i26 = 0;
                            while (true) {
                                int i27 = bArrB[i22];
                                i22++;
                                int i28 = i27 & 255;
                                if (i28 != 255) {
                                    int i29 = i26 + i28;
                                    if (bArrB[i22] != 1) {
                                        throw zzat.zzb("Error parsing vorbis codec private", null);
                                    }
                                    byte[] bArr6 = new byte[i25];
                                    System.arraycopy(bArrB, i22, bArr6, 0, i25);
                                    int i30 = i22 + i25;
                                    if (bArrB[i30] != 3) {
                                        throw zzat.zzb("Error parsing vorbis codec private", null);
                                    }
                                    int i31 = i30 + i29;
                                    if (bArrB[i31] != 5) {
                                        throw zzat.zzb("Error parsing vorbis codec private", null);
                                    }
                                    int length2 = bArrB.length - i31;
                                    byte[] bArr7 = new byte[length2];
                                    System.arraycopy(bArrB, i31, bArr7, 0, length2);
                                    ArrayList arrayList2 = new ArrayList(2);
                                    arrayList2.add(bArr6);
                                    arrayList2.add(bArr7);
                                    str4 = MimeTypes.AUDIO_VORBIS;
                                    str = null;
                                    i11 = 8192;
                                    list6 = arrayList2;
                                    iV = -1;
                                    list = list6;
                                    if (this.P != null) {
                                    }
                                    int i15222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                                    sm2Var = new sm2();
                                    if (hc.zza(str4)) {
                                    }
                                    str2 = this.f11046b;
                                    if (str2 != null) {
                                    }
                                    sm2Var.q(i10);
                                    sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                                    sm2Var.zzm(str4);
                                    sm2Var.f16483f = i11;
                                    sm2Var.zze(this.Z);
                                    sm2Var.f16479b = i15222222222;
                                    sm2Var.zzp(list);
                                    sm2Var.zzj(str);
                                    sm2Var.zzq(this.f11059m);
                                    this.f11047b0 = new zn2(sm2Var);
                                    return;
                                }
                                i26 += 255;
                            }
                        }
                    }
                } catch (ArrayIndexOutOfBoundsException unused2) {
                    throw zzat.zzb("Error parsing vorbis codec private", null);
                }
                break;
            case 12:
                ArrayList arrayList3 = new ArrayList(3);
                arrayList3.add(b(this.f11048c));
                ByteBuffer byteBufferAllocate = ByteBuffer.allocate(8);
                ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
                arrayList3.add(byteBufferAllocate.order(byteOrder).putLong(this.T).array());
                arrayList3.add(ByteBuffer.allocate(8).order(byteOrder).putLong(this.U).array());
                i14 = 5760;
                str4 = MimeTypes.AUDIO_OPUS;
                str = null;
                arrayList = arrayList3;
                i11 = i14;
                list6 = arrayList;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 13:
                List listSingletonList2 = Collections.singletonList(b(str3));
                byte[] bArr8 = this.f11058l;
                l2.h hVarQ = ni.q(new androidx.media3.extractor.b1(bArr8, bArr8.length), false);
                this.S = hVarQ.f29996b;
                this.Q = hVarQ.f29997c;
                str = (String) hVarQ.f29998d;
                str4 = MimeTypes.AUDIO_AAC;
                list4 = listSingletonList2;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 14:
                str4 = MimeTypes.AUDIO_MPEG_L2;
                arrayList = null;
                str = null;
                i11 = i14;
                list6 = arrayList;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i15222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 15:
                str4 = MimeTypes.AUDIO_MPEG;
                arrayList = null;
                str = null;
                i11 = i14;
                list6 = arrayList;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 16:
                str4 = MimeTypes.AUDIO_AC3;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 17:
                str4 = MimeTypes.AUDIO_E_AC3;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i15222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 18:
                this.V = new v3();
                str4 = MimeTypes.AUDIO_TRUEHD;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 19:
            case 20:
                this.W = true;
                str4 = MimeTypes.AUDIO_DTS;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 21:
                str4 = MimeTypes.AUDIO_DTS_HD;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i15222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 22:
                List listSingletonList3 = Collections.singletonList(b(str3));
                str4 = MimeTypes.AUDIO_FLAC;
                list5 = listSingletonList3;
                str = null;
                list4 = list5;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 23:
                p01 p01Var2 = new p01(b(this.f11048c));
                try {
                    int iK = p01Var2.K();
                    if (iK != 1) {
                        if (iK == 65534) {
                            p01Var2.C(24);
                            long jD = p01Var2.d();
                            UUID uuid = g6.f11498n0;
                            if (jD == uuid.getMostSignificantBits()) {
                                if (p01Var2.d() == uuid.getLeastSignificantBits()) {
                                }
                                list4 = null;
                                str = null;
                                str4 = MimeTypes.AUDIO_UNKNOWN;
                                list3 = list4;
                                i11 = -1;
                                list6 = list3;
                                iV = -1;
                                list = list6;
                                if (this.P != null) {
                                }
                                int i1522222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                                sm2Var = new sm2();
                                if (hc.zza(str4)) {
                                }
                                str2 = this.f11046b;
                                if (str2 != null) {
                                }
                                sm2Var.q(i10);
                                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                                sm2Var.zzm(str4);
                                sm2Var.f16483f = i11;
                                sm2Var.zze(this.Z);
                                sm2Var.f16479b = i1522222222222222222222;
                                sm2Var.zzp(list);
                                sm2Var.zzj(str);
                                sm2Var.zzq(this.f11059m);
                                this.f11047b0 = new zn2(sm2Var);
                                return;
                            }
                        }
                        vt0.c("Non-PCM MS/ACM is unsupported. Setting mimeType to audio/x-unknown");
                        list4 = null;
                        str = null;
                        str4 = MimeTypes.AUDIO_UNKNOWN;
                        list3 = list4;
                        i11 = -1;
                        list6 = list3;
                        iV = -1;
                        list = list6;
                        if (this.P != null) {
                        }
                        int i15222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                        sm2Var = new sm2();
                        if (hc.zza(str4)) {
                        }
                        str2 = this.f11046b;
                        if (str2 != null) {
                        }
                        sm2Var.q(i10);
                        sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                        sm2Var.zzm(str4);
                        sm2Var.f16483f = i11;
                        sm2Var.zze(this.Z);
                        sm2Var.f16479b = i15222222222222222222222;
                        sm2Var.zzp(list);
                        sm2Var.zzj(str);
                        sm2Var.zzq(this.f11059m);
                        this.f11047b0 = new zn2(sm2Var);
                        return;
                    }
                    iV = bb1.v(this.R, ByteOrder.LITTLE_ENDIAN);
                    if (iV == 0) {
                        int i32 = this.R;
                        StringBuilder sb = new StringBuilder(String.valueOf(i32).length() + 64);
                        sb.append("Unsupported PCM bit depth: ");
                        sb.append(i32);
                        sb.append(". Setting mimeType to audio/x-unknown");
                        vt0.c(sb.toString());
                        list4 = null;
                        str = null;
                        str4 = MimeTypes.AUDIO_UNKNOWN;
                        list3 = list4;
                        i11 = -1;
                        list6 = list3;
                        iV = -1;
                        list = list6;
                        if (this.P != null) {
                        }
                        int i152222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                        sm2Var = new sm2();
                        if (hc.zza(str4)) {
                        }
                        str2 = this.f11046b;
                        if (str2 != null) {
                        }
                        sm2Var.q(i10);
                        sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                        sm2Var.zzm(str4);
                        sm2Var.f16483f = i11;
                        sm2Var.zze(this.Z);
                        sm2Var.f16479b = i152222222222222222222222;
                        sm2Var.zzp(list);
                        sm2Var.zzj(str);
                        sm2Var.zzq(this.f11059m);
                        this.f11047b0 = new zn2(sm2Var);
                        return;
                    }
                    list = null;
                    str = null;
                    str4 = MimeTypes.AUDIO_RAW;
                    i11 = -1;
                    if (this.P != null) {
                    }
                    int i1522222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                    sm2Var = new sm2();
                    if (hc.zza(str4)) {
                    }
                    str2 = this.f11046b;
                    if (str2 != null) {
                    }
                    sm2Var.q(i10);
                    sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                    sm2Var.zzm(str4);
                    sm2Var.f16483f = i11;
                    sm2Var.zze(this.Z);
                    sm2Var.f16479b = i1522222222222222222222222;
                    sm2Var.zzp(list);
                    sm2Var.zzj(str);
                    sm2Var.zzq(this.f11059m);
                    this.f11047b0 = new zn2(sm2Var);
                    return;
                } catch (ArrayIndexOutOfBoundsException unused3) {
                    throw zzat.zzb("Error parsing MS/ACM codec private", null);
                }
            case 24:
                iV = bb1.v(this.R, ByteOrder.LITTLE_ENDIAN);
                if (iV == 0) {
                    int i33 = this.R;
                    StringBuilder sb2 = new StringBuilder(String.valueOf(i33).length() + 78);
                    sb2.append("Unsupported little endian PCM bit depth: ");
                    sb2.append(i33);
                    sb2.append(". Setting mimeType to audio/x-unknown");
                    vt0.c(sb2.toString());
                    list4 = null;
                    str = null;
                    str4 = MimeTypes.AUDIO_UNKNOWN;
                    list3 = list4;
                    i11 = -1;
                    list6 = list3;
                    iV = -1;
                    list = list6;
                    if (this.P != null) {
                    }
                    int i15222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                    sm2Var = new sm2();
                    if (hc.zza(str4)) {
                    }
                    str2 = this.f11046b;
                    if (str2 != null) {
                    }
                    sm2Var.q(i10);
                    sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                    sm2Var.zzm(str4);
                    sm2Var.f16483f = i11;
                    sm2Var.zze(this.Z);
                    sm2Var.f16479b = i15222222222222222222222222;
                    sm2Var.zzp(list);
                    sm2Var.zzj(str);
                    sm2Var.zzq(this.f11059m);
                    this.f11047b0 = new zn2(sm2Var);
                    return;
                }
                list = null;
                str = null;
                str4 = MimeTypes.AUDIO_RAW;
                i11 = -1;
                if (this.P != null) {
                }
                int i152222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 25:
                int i34 = this.R;
                if (i34 == 8) {
                    list = null;
                    str = null;
                    str4 = MimeTypes.AUDIO_RAW;
                    i11 = -1;
                    iV = 3;
                    if (this.P != null) {
                    }
                    int i1522222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                    sm2Var = new sm2();
                    if (hc.zza(str4)) {
                    }
                    str2 = this.f11046b;
                    if (str2 != null) {
                    }
                    sm2Var.q(i10);
                    sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                    sm2Var.zzm(str4);
                    sm2Var.f16483f = i11;
                    sm2Var.zze(this.Z);
                    sm2Var.f16479b = i1522222222222222222222222222;
                    sm2Var.zzp(list);
                    sm2Var.zzj(str);
                    sm2Var.zzq(this.f11059m);
                    this.f11047b0 = new zn2(sm2Var);
                    return;
                }
                if (i34 == 16) {
                    iV = 268435456;
                } else if (i34 == 24) {
                    iV = C.ENCODING_PCM_24BIT_BIG_ENDIAN;
                } else {
                    if (i34 != 32) {
                        StringBuilder sb3 = new StringBuilder(String.valueOf(i34).length() + 75);
                        sb3.append("Unsupported big endian PCM bit depth: ");
                        sb3.append(i34);
                        sb3.append(". Setting mimeType to audio/x-unknown");
                        vt0.c(sb3.toString());
                        list4 = null;
                        str = null;
                        str4 = MimeTypes.AUDIO_UNKNOWN;
                        list3 = list4;
                        i11 = -1;
                        list6 = list3;
                        iV = -1;
                        list = list6;
                        if (this.P != null) {
                        }
                        int i15222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                        sm2Var = new sm2();
                        if (hc.zza(str4)) {
                        }
                        str2 = this.f11046b;
                        if (str2 != null) {
                        }
                        sm2Var.q(i10);
                        sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                        sm2Var.zzm(str4);
                        sm2Var.f16483f = i11;
                        sm2Var.zze(this.Z);
                        sm2Var.f16479b = i15222222222222222222222222222;
                        sm2Var.zzp(list);
                        sm2Var.zzj(str);
                        sm2Var.zzq(this.f11059m);
                        this.f11047b0 = new zn2(sm2Var);
                        return;
                    }
                    iV = C.ENCODING_PCM_32BIT_BIG_ENDIAN;
                }
                list = null;
                str = null;
                str4 = MimeTypes.AUDIO_RAW;
                i11 = -1;
                if (this.P != null) {
                }
                int i152222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 26:
                int i35 = this.R;
                if (i35 != 32) {
                    StringBuilder sb4 = new StringBuilder(String.valueOf(i35).length() + 79);
                    sb4.append("Unsupported floating point PCM bit depth: ");
                    sb4.append(i35);
                    sb4.append(". Setting mimeType to audio/x-unknown");
                    vt0.c(sb4.toString());
                    list4 = null;
                    str = null;
                    str4 = MimeTypes.AUDIO_UNKNOWN;
                    list3 = list4;
                    i11 = -1;
                    list6 = list3;
                    iV = -1;
                    list = list6;
                    if (this.P != null) {
                    }
                    int i1522222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                    sm2Var = new sm2();
                    if (hc.zza(str4)) {
                    }
                    str2 = this.f11046b;
                    if (str2 != null) {
                    }
                    sm2Var.q(i10);
                    sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                    sm2Var.zzm(str4);
                    sm2Var.f16483f = i11;
                    sm2Var.zze(this.Z);
                    sm2Var.f16479b = i1522222222222222222222222222222;
                    sm2Var.zzp(list);
                    sm2Var.zzj(str);
                    sm2Var.zzq(this.f11059m);
                    this.f11047b0 = new zn2(sm2Var);
                    return;
                }
                list = null;
                str = null;
                str4 = MimeTypes.AUDIO_RAW;
                i11 = -1;
                if (this.P != null) {
                }
                int i15222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 27:
                str4 = MimeTypes.APPLICATION_SUBRIP;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 28:
            case 29:
                byte[] bArr9 = g6.f11494j0;
                zzguf zzgufVarP = zzguf.p(g6.f11495k0, b(this.f11048c));
                str4 = MimeTypes.TEXT_SSA;
                list5 = zzgufVarP;
                str = null;
                list4 = list5;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 30:
                str4 = MimeTypes.TEXT_VTT;
                list4 = null;
                str = null;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i15222222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 31:
                zzguf zzgufVarO3 = zzguf.o(b(str3));
                str = null;
                str4 = MimeTypes.APPLICATION_VOBSUB;
                list4 = zzgufVarO3;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i152222222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i152222222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 32:
                list4 = null;
                str = null;
                str4 = MimeTypes.APPLICATION_PGS;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i1522222222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i1522222222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            case 33:
                byte[] bArr10 = new byte[4];
                System.arraycopy(b(str3), 0, bArr10, 0, 4);
                zzguf zzgufVarO4 = zzguf.o(bArr10);
                str = null;
                str4 = MimeTypes.APPLICATION_DVBSUBS;
                list4 = zzgufVarO4;
                list3 = list4;
                i11 = -1;
                list6 = list3;
                iV = -1;
                list = list6;
                if (this.P != null) {
                }
                int i15222222222222222222222222222222222222 = (this.Y ? 1 : 0) | (true != this.X ? 0 : 2);
                sm2Var = new sm2();
                if (hc.zza(str4)) {
                }
                str2 = this.f11046b;
                if (str2 != null) {
                }
                sm2Var.q(i10);
                sm2Var.zzl(true != this.f11044a ? MimeTypes.VIDEO_MATROSKA : MimeTypes.VIDEO_WEBM);
                sm2Var.zzm(str4);
                sm2Var.f16483f = i11;
                sm2Var.zze(this.Z);
                sm2Var.f16479b = i15222222222222222222222222222222222222;
                sm2Var.zzp(list);
                sm2Var.zzj(str);
                sm2Var.zzq(this.f11059m);
                this.f11047b0 = new zn2(sm2Var);
                return;
            default:
                throw zzat.zzb("Unrecognized codec identifier.", null);
        }
    }

    public final byte[] b(String str) throws zzat {
        byte[] bArr = this.f11058l;
        if (bArr != null) {
            return bArr;
        }
        throw zzat.zzb("Missing CodecPrivate for codec ".concat(String.valueOf(str)), null);
    }
}
