MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0
e.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package z5; import android.util.Log; import android.util.Pair; import android.util.SparseArray; import com.google.android.exoplayer2.drm.DrmInitData; import com.huawei.hms.support.api.entity.core.JosStatusCodes; import fb.v; import i5.f0; import i5.r0; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.UUID; import k5.a; import l2.g; import m7.o; import m7.p; import m7.s; import m7.z; import o1.n; import u5.i; import u5.j; import u5.k; import u5.u; import u5.x; import u5.y; import z5.b; public class e implements i { public static final byte[] f45324b0 = {49, 10, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 48, 48, 32, 45, 45, 62, 32, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 48, 48, 10}; public static final byte[] f45325c0 = z.F("Format: Start, End, ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text"); public static final byte[] f45326d0 = {68, 105, 97, 108, 111, 103, 117, 101, 58, 32, 48, 58, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 58, 48, 48, 58, 48, 48, 58, 48, 48, 44}; public static final byte[] f45327e0 = {87, 69, 66, 86, 84, 84, 10, 10, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 32, 45, 45, 62, 32, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 10}; public static final UUID f45328f0 = new UUID(72057594037932032L, -9223371306706625679L); public static final Map<String, Integer> f45329g0; public long A; public long B; public g C; public g D; public boolean E; public boolean F; public int G; public long H; public long I; public int J; public int K; public int[] L; public int M; public int N; public int O; public int P; public boolean Q; public int R; public int S; public int T; public boolean U; public boolean V; public boolean W; public int X; public byte Y; public boolean Z; public final d f45330a; public k f45331a0; public final f f45332b; public final SparseArray<c> f45333c; public final boolean f45334d; public final s f45335e; public final s f45336f; public final s f45337g; public final s f45338h; public final s f45339i; public final s f45340j; public final s f45341k; public final s f45342l; public final s f45343m; public final s f45344n; public ByteBuffer f45345o; public long f45346p; public long f45347q; public long f45348r; public long f45349s; public long f45350t; public c f45351u; public boolean f45352v; public int f45353w; public long f45354x; public boolean f45355y; public long f45356z; public final class b implements z5.c { public b(a aVar) { } } public static final class c { public byte[] N; public y T; public boolean U; public x X; public int Y; public String f45358a; public String f45359b; public int f45360c; public int f45361d; public int f45362e; public int f45363f; public int f45364g; public boolean f45365h; public byte[] f45366i; public x.a f45367j; public byte[] f45368k; public DrmInitData f45369l; public int f45370m = -1; public int f45371n = -1; public int f45372o = -1; public int f45373p = -1; public int f45374q = 0; public int f45375r = -1; public float f45376s = 0.0f; public float f45377t = 0.0f; public float f45378u = 0.0f; public byte[] f45379v = null; public int f45380w = -1; public boolean f45381x = false; public int f45382y = -1; public int f45383z = -1; public int A = -1; public int B = 1000; public int C = 200; public float D = -1.0f; public float E = -1.0f; public float F = -1.0f; public float G = -1.0f; public float H = -1.0f; public float I = -1.0f; public float J = -1.0f; public float K = -1.0f; public float L = -1.0f; public float M = -1.0f; public int O = 1; public int P = -1; public int Q = JosStatusCodes.RTN_CODE_COMMON_ERROR; public long R = 0; public long S = 0; public boolean V = true; public String W = "eng"; public final byte[] a(String str) { byte[] bArr = this.f45368k; if (bArr != null) { return bArr; } throw r0.a("Missing CodecPrivate for codec " + str, null); } } static { HashMap hashMap = new HashMap(); hashMap.put("htc_video_rotA-000", 0); hashMap.put("htc_video_rotA-090", 90); hashMap.put("htc_video_rotA-180", 180); hashMap.put("htc_video_rotA-270", 270); f45329g0 = Collections.unmodifiableMap(hashMap); } public e(int i10) { z5.b bVar = new z5.b(); this.f45347q = -1L; this.f45348r = -9223372036854775807L; this.f45349s = -9223372036854775807L; this.f45350t = -9223372036854775807L; this.f45356z = -1L; this.A = -1L; this.B = -9223372036854775807L; this.f45330a = bVar; bVar.f45318d = new b(null); this.f45334d = (i10 & 1) == 0; this.f45332b = new f(); this.f45333c = new SparseArray<>(); this.f45337g = new s(4); this.f45338h = new s(ByteBuffer.allocate(4).putInt(-1).array()); this.f45339i = new s(4); this.f45335e = new s(p.f36429a); this.f45336f = new s(4); this.f45340j = new s(); this.f45341k = new s(); this.f45342l = new s(8); this.f45343m = new s(); this.f45344n = new s(); this.L = new int[1]; } public static int[] f(int[] iArr, int i10) { return iArr == null ? new int[i10] : iArr.length >= i10 ? iArr : new int[Math.max(iArr.length * 2, i10)]; } public static byte[] j(long j10, String str, long j11) { c0.a.b(j10 != -9223372036854775807L); int i10 = (int) (j10 / 3600000000L); long j12 = j10 - ((i10 * 3600) * 1000000); int i11 = (int) (j12 / 60000000); long j13 = j12 - ((i11 * 60) * 1000000); int i12 = (int) (j13 / 1000000); return z.F(String.format(Locale.US, str, Integer.valueOf(i10), Integer.valueOf(i11), Integer.valueOf(i12), Integer.valueOf((int) ((j13 - (i12 * 1000000)) / j11)))); } @Override public void a(long j10, long j11) { this.B = -9223372036854775807L; this.G = 0; z5.b bVar = (z5.b) this.f45330a; bVar.f45319e = 0; bVar.f45316b.clear(); f fVar = bVar.f45317c; fVar.f45386b = 0; fVar.f45387c = 0; f fVar2 = this.f45332b; fVar2.f45386b = 0; fVar2.f45387c = 0; l(); for (int i10 = 0; i10 < this.f45333c.size(); i10++) { y yVar = this.f45333c.valueAt(i10).T; if (yVar != null) { yVar.f41682b = false; yVar.f41683c = 0; } } } public final void b(int i10) { if (this.C == null || this.D == null) { throw r0.a("Element " + i10 + " must be in a Cues", null); } } public final void c(int i10) { if (this.f45351u != null) { return; } throw r0.a("Element " + i10 + " must be in a TrackEntry", null); } public final void d(c cVar, long j10, int i10, int i11, int i12) { byte[] j11; int i13; int i14; int i15; int i16; y yVar = cVar.T; if (yVar != null) { yVar.b(cVar.X, j10, i10, i11, i12, cVar.f45367j); } else { if ("S_TEXT/UTF8".equals(cVar.f45359b) || "S_TEXT/ASS".equals(cVar.f45359b) || "S_TEXT/WEBVTT".equals(cVar.f45359b)) { if (this.K > 1) { Log.w("MatroskaExtractor", "Skipping subtitle sample in laced block."); } else { long j12 = this.I; if (j12 == -9223372036854775807L) { Log.w("MatroskaExtractor", "Skipping subtitle sample with no duration."); } else { String str = cVar.f45359b; byte[] bArr = this.f45341k.f36467a; Objects.requireNonNull(str); int hashCode = str.hashCode(); char c10 = 65535; if (hashCode != 738597099) { if (hashCode != 1045209816) { if (hashCode == 1422270023 && str.equals("S_TEXT/UTF8")) { c10 = 2; } } else if (str.equals("S_TEXT/WEBVTT")) { c10 = 1; } } else if (str.equals("S_TEXT/ASS")) { c10 = 0; } if (c10 == 0) { j11 = j(j12, "%01d:%02d:%02d:%02d", 10000L); i13 = 21; } else if (c10 == 1) { j11 = j(j12, "%02d:%02d:%02d.%03d", 1000L); i13 = 25; } else { if (c10 != 2) { throw new IllegalArgumentException(); } j11 = j(j12, "%02d:%02d:%02d,%03d", 1000L); i13 = 19; } System.arraycopy(j11, 0, bArr, i13, j11.length); int i17 = this.f45341k.f36468b; while (true) { s sVar = this.f45341k; if (i17 >= sVar.f36469c) { break; } if (sVar.f36467a[i17] == 0) { sVar.E(i17); break; } i17++; } x xVar = cVar.X; s sVar2 = this.f45341k; xVar.e(sVar2, sVar2.f36469c); i14 = i11 + this.f45341k.f36469c; if ((i10 & 268435456) != 0) { if (this.K > 1) { i16 = i14; i15 = i10 & (-268435457); cVar.X.c(j10, i15, i16, i12, cVar.f45367j); } else { s sVar3 = this.f45344n; int i18 = sVar3.f36469c; cVar.X.f(sVar3, i18, 2); i14 += i18; } } i15 = i10; i16 = i14; cVar.X.c(j10, i15, i16, i12, cVar.f45367j); } } } i14 = i11; if ((i10 & 268435456) != 0) { } i15 = i10; i16 = i14; cVar.X.c(j10, i15, i16, i12, cVar.f45367j); } this.F = true; } public void e(int i10) { char c10; boolean z10; char c11; int i11; List<byte[]> list; int i12; int i13; boolean z11; String str; List<byte[]> list2; int i14; String str2; ArrayList arrayList; String str3; String str4; int i15; List<byte[]> list3; Pair pair; String str5; String str6; String str7; List<byte[]> list4; List<byte[]> list5; List<byte[]> list6; List<byte[]> list7; byte[] bArr; f0.b bVar; int i16; n7.b bVar2; int i17; byte[] bArr2; int i18; String str8; m2.b a10; List<byte[]> list8; u bVar3; int i19; c0.a.g(this.f45331a0); int i20 = 0; if (i10 == 160) { if (this.G != 2) { return; } int i21 = 0; for (int i22 = 0; i22 < this.K; i22++) { i21 += this.L[i22]; } c cVar = this.f45333c.get(this.M); Objects.requireNonNull(cVar.X); int i23 = 0; while (i23 < this.K) { long j10 = this.H + ((cVar.f45362e * i23) / 1000); int i24 = this.O; if (i23 == 0 && !this.Q) { i24 |= 1; } int i25 = this.L[i23]; int i26 = i21 - i25; d(cVar, j10, i24, i25, i26); i23++; i21 = i26; } this.G = 0; return; } if (i10 != 174) { if (i10 == 19899) { int i27 = this.f45353w; if (i27 != -1) { long j11 = this.f45354x; if (j11 != -1) { if (i27 == 475249515) { this.f45356z = j11; return; } return; } } throw r0.a("Mandatory element SeekID or SeekPosition not found", null); } if (i10 == 25152) { c(i10); c cVar2 = this.f45351u; if (cVar2.f45365h) { x.a aVar = cVar2.f45367j; if (aVar == null) { throw r0.a("Encrypted Track found but ContentEncKeyID was not found", null); } cVar2.f45369l = new DrmInitData(null, true, new DrmInitData.SchemeData(i5.i.f32303a, null, "video/webm", aVar.f41678b)); return; } return; } if (i10 == 28032) { c(i10); c cVar3 = this.f45351u; if (cVar3.f45365h && cVar3.f45366i != null) { throw r0.a("Combining encryption and compression is not supported", null); } return; } if (i10 == 357149030) { if (this.f45348r == -9223372036854775807L) { this.f45348r = 1000000L; } long j12 = this.f45349s; if (j12 != -9223372036854775807L) { this.f45350t = m(j12); return; } return; } if (i10 == 374648427) { if (this.f45333c.size() == 0) { throw r0.a("No valid tracks were found", null); } this.f45331a0.b(); return; } if (i10 != 475249515) { return; } if (!this.f45352v) { k kVar = this.f45331a0; g gVar = this.C; g gVar2 = this.D; if (this.f45347q == -1 || this.f45350t == -9223372036854775807L || gVar == null || gVar.c() == 0 || gVar2 == null || gVar2.c() != gVar.c()) { bVar3 = new u.b(this.f45350t, 0L); } else { int c12 = gVar.c(); int[] iArr = new int[c12]; long[] jArr = new long[c12]; long[] jArr2 = new long[c12]; long[] jArr3 = new long[c12]; for (int i28 = 0; i28 < c12; i28++) { jArr3[i28] = gVar.b(i28); jArr[i28] = gVar2.b(i28) + this.f45347q; } while (true) { i19 = c12 - 1; if (i20 >= i19) { break; } int i29 = i20 + 1; iArr[i20] = (int) (jArr[i29] - jArr[i20]); jArr2[i20] = jArr3[i29] - jArr3[i20]; i20 = i29; } iArr[i19] = (int) ((this.f45347q + this.f45346p) - jArr[i19]); jArr2[i19] = this.f45350t - jArr3[i19]; long j13 = jArr2[i19]; if (j13 <= 0) { Log.w("MatroskaExtractor", "Discarding last cue point with unexpected duration: " + j13); iArr = Arrays.copyOf(iArr, i19); jArr = Arrays.copyOf(jArr, i19); jArr2 = Arrays.copyOf(jArr2, i19); jArr3 = Arrays.copyOf(jArr3, i19); } bVar3 = new u5.d(iArr, jArr, jArr2, jArr3); } kVar.k(bVar3); this.f45352v = true; } this.C = null; this.D = null; return; } ?? r02 = this.f45351u; c0.a.g(r02); String str9 = r02.f45359b; if (str9 == null) { throw r0.a("CodecId is missing in TrackEntry element", null); } int i30 = 4; switch (str9.hashCode()) { case -2095576542: if (str9.equals("V_MPEG4/ISO/AP")) { c10 = 0; break; } c10 = 65535; break; case -2095575984: if (str9.equals("V_MPEG4/ISO/SP")) { c10 = 1; break; } c10 = 65535; break; case -1985379776: if (str9.equals("A_MS/ACM")) { c10 = 2; break; } c10 = 65535; break; case -1784763192: if (str9.equals("A_TRUEHD")) { c10 = 3; break; } c10 = 65535; break; case -1730367663: if (str9.equals("A_VORBIS")) { c10 = 4; break; } c10 = 65535; break; case -1482641358: if (str9.equals("A_MPEG/L2")) { c10 = 5; break; } c10 = 65535; break; case -1482641357: if (str9.equals("A_MPEG/L3")) { c10 = 6; break; } c10 = 65535; break; case -1373388978: if (str9.equals("V_MS/VFW/FOURCC")) { c10 = 7; break; } c10 = 65535; break; case -933872740: if (str9.equals("S_DVBSUB")) { c10 = '\b'; break; } c10 = 65535; break; case -538363189: if (str9.equals("V_MPEG4/ISO/ASP")) { c10 = '\t'; break; } c10 = 65535; break; case -538363109: if (str9.equals("V_MPEG4/ISO/AVC")) { c10 = '\n'; break; } c10 = 65535; break; case -425012669: if (str9.equals("S_VOBSUB")) { c10 = 11; break; } c10 = 65535; break; case -356037306: if (str9.equals("A_DTS/LOSSLESS")) { c10 = '\f'; break; } c10 = 65535; break; case 62923557: if (str9.equals("A_AAC")) { c10 = '\r'; break; } c10 = 65535; break; case 62923603: if (str9.equals("A_AC3")) { c10 = 14; break; } c10 = 65535; break; case 62927045: if (str9.equals("A_DTS")) { c10 = 15; break; } c10 = 65535; break; case 82318131: if (str9.equals("V_AV1")) { c10 = 16; break; } c10 = 65535; break; case 82338133: if (str9.equals("V_VP8")) { c10 = 17; break; } c10 = 65535; break; case 82338134: if (str9.equals("V_VP9")) { c10 = 18; break; } c10 = 65535; break; case 99146302: if (str9.equals("S_HDMV/PGS")) { c10 = 19; break; } c10 = 65535; break; case 444813526: if (str9.equals("V_THEORA")) { c10 = 20; break; } c10 = 65535; break; case 542569478: if (str9.equals("A_DTS/EXPRESS")) { c10 = 21; break; } c10 = 65535; break; case 635596514: if (str9.equals("A_PCM/FLOAT/IEEE")) { c10 = 22; break; } c10 = 65535; break; case 725948237: if (str9.equals("A_PCM/INT/BIG")) { c10 = 23; break; } c10 = 65535; break; case 725957860: if (str9.equals("A_PCM/INT/LIT")) { c10 = 24; break; } c10 = 65535; break; case 738597099: if (str9.equals("S_TEXT/ASS")) { c10 = 25; break; } c10 = 65535; break; case 855502857: if (str9.equals("V_MPEGH/ISO/HEVC")) { c10 = 26; break; } c10 = 65535; break; case 1045209816: if (str9.equals("S_TEXT/WEBVTT")) { c10 = 27; break; } c10 = 65535; break; case 1422270023: if (str9.equals("S_TEXT/UTF8")) { c10 = 28; break; } c10 = 65535; break; case 1809237540: if (str9.equals("V_MPEG2")) { c10 = 29; break; } c10 = 65535; break; case 1950749482: if (str9.equals("A_EAC3")) { c10 = 30; break; } c10 = 65535; break; case 1950789798: if (str9.equals("A_FLAC")) { c10 = 31; break; } c10 = 65535; break; case 1951062397: if (str9.equals("A_OPUS")) { c10 = ' '; break; } c10 = 65535; break; default: c10 = 65535; break; } switch (c10) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case '\b': case '\t': case '\n': case 11: case '\f': case '\r': case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case ' ': z10 = true; break; default: z10 = false; break; } if (z10) { k kVar2 = this.f45331a0; int i31 = r02.f45360c; String str10 = r02.f45359b; Objects.requireNonNull(str10); switch (str10.hashCode()) { case -2095576542: if (str10.equals("V_MPEG4/ISO/AP")) { c11 = 0; break; } c11 = 65535; break; case -2095575984: if (str10.equals("V_MPEG4/ISO/SP")) { c11 = 1; break; } c11 = 65535; break; case -1985379776: if (str10.equals("A_MS/ACM")) { c11 = 2; break; } c11 = 65535; break; case -1784763192: if (str10.equals("A_TRUEHD")) { c11 = 3; break; } c11 = 65535; break; case -1730367663: if (str10.equals("A_VORBIS")) { c11 = 4; break; } c11 = 65535; break; case -1482641358: if (str10.equals("A_MPEG/L2")) { c11 = 5; break; } c11 = 65535; break; case -1482641357: if (str10.equals("A_MPEG/L3")) { c11 = 6; break; } c11 = 65535; break; case -1373388978: if (str10.equals("V_MS/VFW/FOURCC")) { c11 = 7; break; } c11 = 65535; break; case -933872740: if (str10.equals("S_DVBSUB")) { c11 = '\b'; break; } c11 = 65535; break; case -538363189: if (str10.equals("V_MPEG4/ISO/ASP")) { c11 = '\t'; break; } c11 = 65535; break; case -538363109: if (str10.equals("V_MPEG4/ISO/AVC")) { c11 = '\n'; break; } c11 = 65535; break; case -425012669: if (str10.equals("S_VOBSUB")) { c11 = 11; break; } c11 = 65535; break; case -356037306: if (str10.equals("A_DTS/LOSSLESS")) { c11 = '\f'; break; } c11 = 65535; break; case 62923557: if (str10.equals("A_AAC")) { c11 = '\r'; break; } c11 = 65535; break; case 62923603: if (str10.equals("A_AC3")) { c11 = 14; break; } c11 = 65535; break; case 62927045: if (str10.equals("A_DTS")) { c11 = 15; break; } c11 = 65535; break; case 82318131: if (str10.equals("V_AV1")) { c11 = 16; break; } c11 = 65535; break; case 82338133: if (str10.equals("V_VP8")) { c11 = 17; break; } c11 = 65535; break; case 82338134: if (str10.equals("V_VP9")) { c11 = 18; break; } c11 = 65535; break; case 99146302: if (str10.equals("S_HDMV/PGS")) { c11 = 19; break; } c11 = 65535; break; case 444813526: if (str10.equals("V_THEORA")) { c11 = 20; break; } c11 = 65535; break; case 542569478: if (str10.equals("A_DTS/EXPRESS")) { c11 = 21; break; } c11 = 65535; break; case 635596514: if (str10.equals("A_PCM/FLOAT/IEEE")) { c11 = 22; break; } c11 = 65535; break; case 725948237: if (str10.equals("A_PCM/INT/BIG")) { c11 = 23; break; } c11 = 65535; break; case 725957860: if (str10.equals("A_PCM/INT/LIT")) { c11 = 24; break; } c11 = 65535; break; case 738597099: if (str10.equals("S_TEXT/ASS")) { c11 = 25; break; } c11 = 65535; break; case 855502857: if (str10.equals("V_MPEGH/ISO/HEVC")) { c11 = 26; break; } c11 = 65535; break; case 1045209816: if (str10.equals("S_TEXT/WEBVTT")) { c11 = 27; break; } c11 = 65535; break; case 1422270023: if (str10.equals("S_TEXT/UTF8")) { c11 = 28; break; } c11 = 65535; break; case 1809237540: if (str10.equals("V_MPEG2")) { c11 = 29; break; } c11 = 65535; break; case 1950749482: if (str10.equals("A_EAC3")) { c11 = 30; break; } c11 = 65535; break; case 1950789798: if (str10.equals("A_FLAC")) { c11 = 31; break; } c11 = 65535; break; case 1951062397: if (str10.equals("A_OPUS")) { c11 = ' '; break; } c11 = 65535; break; default: c11 = 65535; break; } String str11 = "video/x-unknown"; String str12 = "audio/raw"; String str13 = "audio/x-unknown"; switch (c11) { case 0: case 1: case '\t': i11 = 3; byte[] bArr3 = r02.f45368k; str13 = "video/mp4v-es"; list = bArr3 == null ? null : Collections.singletonList(bArr3); str12 = str13; i12 = i11; i13 = -1; list8 = list; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null && (a10 = m2.b.a(new s(bArr))) != null) { str = a10.f35906c; str12 = "video/dolby-vision"; } int i32 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { bVar.f32295x = r02.O; bVar.f32296y = r02.Q; bVar.f32297z = i30; i12 = 1; } else if (o.n(str12)) { if (r02.f45374q == 0) { int i33 = r02.f45372o; i16 = -1; if (i33 == -1) { i33 = r02.f45370m; } r02.f45372o = i33; int i34 = r02.f45373p; if (i34 == -1) { i34 = r02.f45371n; } r02.f45373p = i34; } else { i16 = -1; } float f10 = -1.0f; if (r02.f45372o != i16 && (i18 = r02.f45373p) != i16) { f10 = (r02.f45371n * r12) / (r02.f45370m * i18); } if (r02.f45381x) { if (r02.D == -1.0f || r02.E == -1.0f || r02.F == -1.0f || r02.G == -1.0f || r02.H == -1.0f || r02.I == -1.0f || r02.J == -1.0f || r02.K == -1.0f || r02.L == -1.0f || r02.M == -1.0f) { bArr2 = null; } else { bArr2 = new byte[25]; ByteBuffer order = ByteBuffer.wrap(bArr2).order(ByteOrder.LITTLE_ENDIAN); order.put((byte) 0); order.putShort((short) ((r02.D * 50000.0f) + 0.5f)); order.putShort((short) ((r02.E * 50000.0f) + 0.5f)); order.putShort((short) ((r02.F * 50000.0f) + 0.5f)); order.putShort((short) ((r02.G * 50000.0f) + 0.5f)); order.putShort((short) ((r02.H * 50000.0f) + 0.5f)); order.putShort((short) ((r02.I * 50000.0f) + 0.5f)); order.putShort((short) ((r02.J * 50000.0f) + 0.5f)); order.putShort((short) ((r02.K * 50000.0f) + 0.5f)); order.putShort((short) (r02.L + 0.5f)); order.putShort((short) (r02.M + 0.5f)); order.putShort((short) r02.B); order.putShort((short) r02.C); } bVar2 = new n7.b(r02.f45382y, r02.A, r02.f45383z, bArr2); } else { bVar2 = null; } String str14 = r02.f45358a; if (str14 != null) { Map<String, Integer> map = f45329g0; if (map.containsKey(str14)) { i17 = map.get(r02.f45358a).intValue(); if (r02.f45375r == 0 && Float.compare(r02.f45376s, 0.0f) == 0 && Float.compare(r02.f45377t, 0.0f) == 0) { if (Float.compare(r02.f45378u, 0.0f) != 0) { i17 = 0; } else if (Float.compare(r02.f45377t, 90.0f) == 0) { i17 = 90; } else if (Float.compare(r02.f45377t, -180.0f) == 0 || Float.compare(r02.f45377t, 180.0f) == 0) { i17 = 180; } else if (Float.compare(r02.f45377t, -90.0f) == 0) { i17 = 270; } } bVar.f32287p = r02.f45370m; bVar.f32288q = r02.f45371n; bVar.f32291t = f10; bVar.f32290s = i17; bVar.f32292u = r02.f45379v; bVar.f32293v = r02.f45380w; bVar.f32294w = bVar2; i12 = 2; } } i17 = -1; if (r02.f45375r == 0) { if (Float.compare(r02.f45378u, 0.0f) != 0) { } } bVar.f32287p = r02.f45370m; bVar.f32288q = r02.f45371n; bVar.f32291t = f10; bVar.f32290s = i17; bVar.f32292u = r02.f45379v; bVar.f32293v = r02.f45380w; bVar.f32294w = bVar2; i12 = 2; } else if (!"application/x-subrip".equals(str12) && !"text/x-ssa".equals(str12) && !"text/vtt".equals(str12) && !"application/vobsub".equals(str12) && !"application/pgs".equals(str12) && !"application/dvbsubs".equals(str12)) { throw r0.a("Unexpected MIME type.", null); } str8 = r02.f45358a; if (str8 != null && !f45329g0.containsKey(str8)) { bVar.f32273b = r02.f45358a; } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11 = bVar.a(); x c13 = kVar2.c(r02.f45360c, i12); r02.X = c13; c13.d(a11); this.f45333c.put(r02.f45360c, r02); break; case 2: i11 = 3; s sVar = new s(r02.a(r02.f45359b)); try { int m10 = sVar.m(); if (m10 != 1) { if (m10 == 65534) { sVar.F(24); long n10 = sVar.n(); UUID uuid = f45328f0; if (n10 == uuid.getMostSignificantBits()) { break; } } z11 = false; if (!z11) { int y10 = z.y(r02.P); if (y10 != 0) { str = null; i30 = y10; list2 = null; i12 = 3; i13 = -1; list4 = list2; bArr = r02.N; if (bArr != null) { str = a10.f35906c; str12 = "video/dolby-vision"; break; } int i322 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { bVar.f32273b = r02.f45358a; break; } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112 = bVar.a(); x c132 = kVar2.c(r02.f45360c, i12); r02.X = c132; c132.d(a112); this.f45333c.put(r02.f45360c, r02); break; } else { StringBuilder a12 = android.support.v4.media.b.a("Unsupported PCM bit depth: "); a12.append(r02.P); a12.append(". Setting mimeType to "); a12.append("audio/x-unknown"); Log.w("MatroskaExtractor", a12.toString()); } } else { Log.w("MatroskaExtractor", "Non-PCM MS/ACM is unsupported. Setting mimeType to audio/x-unknown"); } list = null; str12 = str13; i12 = i11; i13 = -1; list8 = list; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122 = bVar.a(); x c1322 = kVar2.c(r02.f45360c, i12); r02.X = c1322; c1322.d(a1122); this.f45333c.put(r02.f45360c, r02); } z11 = true; if (!z11) { } list = null; str12 = str13; i12 = i11; i13 = -1; list8 = list; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222 = bVar.a(); x c13222 = kVar2.c(r02.f45360c, i12); r02.X = c13222; c13222.d(a11222); this.f45333c.put(r02.f45360c, r02); } catch (ArrayIndexOutOfBoundsException unused) { throw r0.a("Error parsing MS/ACM codec private", null); } break; case 3: i14 = 3; r02.T = new y(); str2 = "audio/true-hd"; i13 = -1; arrayList = null; str12 = str2; i12 = i14; list8 = arrayList; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222 = bVar.a(); x c132222 = kVar2.c(r02.f45360c, i12); r02.X = c132222; c132222.d(a112222); this.f45333c.put(r02.f45360c, r02); break; case 4: i13 = 8192; byte[] a13 = r02.a(r02.f45359b); try { } catch (ArrayIndexOutOfBoundsException unused2) { r02 = 0; } try { if (a13[0] != 2) { throw r0.a("Error parsing vorbis codec private", null); } int i35 = 1; int i36 = 0; while ((a13[i35] & 255) == 255) { i36 += 255; i35++; } int i37 = i35 + 1; int i38 = i36 + (a13[i35] & 255); int i39 = 0; while ((a13[i37] & 255) == 255) { i39 += 255; i37++; } int i40 = i37 + 1; int i41 = i39 + (a13[i37] & 255); if (a13[i40] != 1) { throw r0.a("Error parsing vorbis codec private", null); } byte[] bArr4 = new byte[i38]; System.arraycopy(a13, i40, bArr4, 0, i38); int i42 = i40 + i38; i14 = 3; if (a13[i42] != 3) { throw r0.a("Error parsing vorbis codec private", null); } int i43 = i42 + i41; if (a13[i43] != 5) { throw r0.a("Error parsing vorbis codec private", null); } byte[] bArr5 = new byte[a13.length - i43]; System.arraycopy(a13, i43, bArr5, 0, a13.length - i43); ArrayList arrayList2 = new ArrayList(2); arrayList2.add(bArr4); arrayList2.add(bArr5); str2 = "audio/vorbis"; arrayList = arrayList2; str12 = str2; i12 = i14; list8 = arrayList; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222 = bVar.a(); x c1322222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222; c1322222.d(a1122222); this.f45333c.put(r02.f45360c, r02); break; } catch (ArrayIndexOutOfBoundsException unused3) { throw r0.a("Error parsing vorbis codec private", r02); } break; case 5: str3 = "audio/mpeg-L2"; str4 = str3; i15 = 4096; list3 = null; str12 = str4; i12 = 3; int i44 = i15; list8 = list3; i13 = i44; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222 = bVar.a(); x c13222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222; c13222222.d(a11222222); this.f45333c.put(r02.f45360c, r02); break; case 6: str3 = "audio/mpeg"; str4 = str3; i15 = 4096; list3 = null; str12 = str4; i12 = 3; int i442 = i15; list8 = list3; i13 = i442; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222 = bVar.a(); x c132222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222; c132222222.d(a112222222); this.f45333c.put(r02.f45360c, r02); break; case 7: byte[] a14 = r02.a(r02.f45359b); try { c0.a.b(16 <= a14.length); long j14 = (a14[16] & 255) | ((a14[17] & 255) << 8) | ((a14[18] & 255) << 16) | ((255 & a14[19]) << 24); if (j14 == 1482049860) { pair = new Pair("video/divx", null); } else if (j14 == 859189832) { pair = new Pair("video/3gpp", null); } else { if (j14 == 826496599) { for (int i45 = 40; i45 < a14.length - 4; i45++) { if (a14[i45] == 0 && a14[i45 + 1] == 0 && a14[i45 + 2] == 1 && a14[i45 + 3] == 15) { pair = new Pair("video/wvc1", Collections.singletonList(Arrays.copyOfRange(a14, i45, a14.length))); } } throw r0.a("Failed to find FourCC VC1 initialization data", null); } Log.w("MatroskaExtractor", "Unknown FourCC. Setting mimeType to video/x-unknown"); pair = new Pair("video/x-unknown", null); } str5 = (String) pair.first; list7 = (List) pair.second; str4 = str5; list5 = list7; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422 = i15; list8 = list3; i13 = i4422; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222 = bVar.a(); x c1322222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222; c1322222222.d(a1122222222); this.f45333c.put(r02.f45360c, r02); break; } catch (ArrayIndexOutOfBoundsException unused4) { throw r0.a("Error parsing FourCC private data", null); } break; case '\b': byte[] bArr6 = new byte[4]; System.arraycopy(r02.a(r02.f45359b), 0, bArr6, 0, 4); str5 = "application/dvbsubs"; list7 = v.u(bArr6); str4 = str5; list5 = list7; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222 = i15; list8 = list3; i13 = i44222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222 = bVar.a(); x c13222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222; c13222222222.d(a11222222222); this.f45333c.put(r02.f45360c, r02); break; case '\n': n7.a b10 = n7.a.b(new s(r02.a(r02.f45359b))); List<byte[]> list9 = b10.f36707a; r02.Y = b10.f36708b; str6 = b10.f36712f; str7 = "video/avc"; list6 = list9; i12 = 3; str12 = str7; i30 = -1; str = str6; list2 = list6; i13 = -1; list4 = list2; bArr = r02.N; if (bArr != null) { } int i322222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222 = bVar.a(); x c132222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222; c132222222222.d(a112222222222); this.f45333c.put(r02.f45360c, r02); break; case 11: str5 = "application/vobsub"; list7 = v.u(r02.a(r02.f45359b)); str4 = str5; list5 = list7; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i442222 = i15; list8 = list3; i13 = i442222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222 = bVar.a(); x c1322222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222; c1322222222222.d(a1122222222222); this.f45333c.put(r02.f45360c, r02); break; case '\f': str11 = "audio/vnd.dts.hd"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422222 = i15; list8 = list3; i13 = i4422222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222 = bVar.a(); x c13222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222; c13222222222222.d(a11222222222222); this.f45333c.put(r02.f45360c, r02); break; case '\r': List<byte[]> singletonList = Collections.singletonList(r02.a(r02.f45359b)); a.b e10 = k5.a.e(r02.f45368k); r02.Q = e10.f34044a; r02.O = e10.f34045b; str6 = e10.f34046c; str7 = "audio/mp4a-latm"; list6 = singletonList; i12 = 3; str12 = str7; i30 = -1; str = str6; list2 = list6; i13 = -1; list4 = list2; bArr = r02.N; if (bArr != null) { } int i322222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222 = bVar.a(); x c132222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222; c132222222222222.d(a112222222222222); this.f45333c.put(r02.f45360c, r02); break; case 14: str11 = "audio/ac3"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222222 = i15; list8 = list3; i13 = i44222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222 = bVar.a(); x c1322222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222; c1322222222222222.d(a1122222222222222); this.f45333c.put(r02.f45360c, r02); break; case 15: case 21: str11 = "audio/vnd.dts"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i442222222 = i15; list8 = list3; i13 = i442222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222 = bVar.a(); x c13222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222; c13222222222222222.d(a11222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 16: str11 = "video/av01"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422222222 = i15; list8 = list3; i13 = i4422222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222 = bVar.a(); x c132222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222; c132222222222222222.d(a112222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 17: str11 = "video/x-vnd.on2.vp8"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222222222 = i15; list8 = list3; i13 = i44222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222222 = bVar.a(); x c1322222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222222; c1322222222222222222.d(a1122222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 18: str11 = "video/x-vnd.on2.vp9"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i442222222222 = i15; list8 = list3; i13 = i442222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222222 = bVar.a(); x c13222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222222; c13222222222222222222.d(a11222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 19: str11 = "application/pgs"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422222222222 = i15; list8 = list3; i13 = i4422222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222222 = bVar.a(); x c132222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222222; c132222222222222222222.d(a112222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 20: str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222222222222 = i15; list8 = list3; i13 = i44222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222222222 = bVar.a(); x c1322222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222222222; c1322222222222222222222.d(a1122222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 22: if (r02.P != 32) { StringBuilder a15 = android.support.v4.media.b.a("Unsupported floating point PCM bit depth: "); a15.append(r02.P); a15.append(". Setting mimeType to "); a15.append("audio/x-unknown"); Log.w("MatroskaExtractor", a15.toString()); list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i442222222222222 = i15; list8 = list3; i13 = i442222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222222222 = bVar.a(); x c13222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222222222; c13222222222222222222222.d(a11222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; } i13 = -1; list4 = null; str = null; i12 = 3; bArr = r02.N; if (bArr != null) { } int i322222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222222222 = bVar.a(); x c132222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222222222; c132222222222222222222222.d(a112222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 23: int i46 = r02.P; if (i46 == 8) { i30 = 3; } else if (i46 != 16) { StringBuilder a16 = android.support.v4.media.b.a("Unsupported big endian PCM bit depth: "); a16.append(r02.P); a16.append(". Setting mimeType to "); a16.append("audio/x-unknown"); Log.w("MatroskaExtractor", a16.toString()); list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422222222222222 = i15; list8 = list3; i13 = i4422222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222222222222 = bVar.a(); x c1322222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222222222222; c1322222222222222222222222.d(a1122222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; } else { i30 = 268435456; } i13 = -1; list4 = null; str = null; i12 = 3; bArr = r02.N; if (bArr != null) { } int i32222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222222222222 = bVar.a(); x c13222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222222222222; c13222222222222222222222222.d(a11222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 24: i30 = z.y(r02.P); if (i30 == 0) { StringBuilder a17 = android.support.v4.media.b.a("Unsupported little endian PCM bit depth: "); a17.append(r02.P); a17.append(". Setting mimeType to "); a17.append("audio/x-unknown"); Log.w("MatroskaExtractor", a17.toString()); list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222222222222222 = i15; list8 = list3; i13 = i44222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222222222222 = bVar.a(); x c132222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222222222222; c132222222222222222222222222.d(a112222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; } i13 = -1; list4 = null; str = null; i12 = 3; bArr = r02.N; if (bArr != null) { } int i3222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222222222222222 = bVar.a(); x c1322222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222222222222222; c1322222222222222222222222222.d(a1122222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 25: str5 = "text/x-ssa"; list7 = v.w(f45325c0, r02.a(r02.f45359b)); str4 = str5; list5 = list7; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i442222222222222222 = i15; list8 = list3; i13 = i442222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222222222222222 = bVar.a(); x c13222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222222222222222; c13222222222222222222222222222.d(a11222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 26: n7.e a18 = n7.e.a(new s(r02.a(r02.f45359b))); List<byte[]> list10 = a18.f36760a; r02.Y = a18.f36761b; str6 = a18.f36763d; str7 = "video/hevc"; list6 = list10; i12 = 3; str12 = str7; i30 = -1; str = str6; list2 = list6; i13 = -1; list4 = list2; bArr = r02.N; if (bArr != null) { } int i322222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222222222222222 = bVar.a(); x c132222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222222222222222; c132222222222222222222222222222.d(a112222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 27: str11 = "text/vtt"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422222222222222222 = i15; list8 = list3; i13 = i4422222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222222222222222222 = bVar.a(); x c1322222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222222222222222222; c1322222222222222222222222222222.d(a1122222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 28: str11 = "application/x-subrip"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222222222222222222 = i15; list8 = list3; i13 = i44222222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222222222222222222 = bVar.a(); x c13222222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222222222222222222; c13222222222222222222222222222222.d(a11222222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 29: str11 = "video/mpeg2"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i442222222222222222222 = i15; list8 = list3; i13 = i442222222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222222222222222222 = bVar.a(); x c132222222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222222222222222222; c132222222222222222222222222222222.d(a112222222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 30: str11 = "audio/eac3"; str13 = str11; list5 = null; str4 = str13; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i4422222222222222222222 = i15; list8 = list3; i13 = i4422222222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i3222222222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i3222222222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a1122222222222222222222222222222222 = bVar.a(); x c1322222222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c1322222222222222222222222222222222; c1322222222222222222222222222222222.d(a1122222222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case 31: str5 = "audio/flac"; list7 = Collections.singletonList(r02.a(r02.f45359b)); str4 = str5; list5 = list7; i15 = -1; list3 = list5; str12 = str4; i12 = 3; int i44222222222222222222222 = i15; list8 = list3; i13 = i44222222222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i32222222222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i32222222222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a11222222222222222222222222222222222 = bVar.a(); x c13222222222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c13222222222222222222222222222222222; c13222222222222222222222222222222222.d(a11222222222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; case ' ': ArrayList arrayList3 = new ArrayList(3); arrayList3.add(r02.a(r02.f45359b)); ByteBuffer allocate = ByteBuffer.allocate(8); ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN; arrayList3.add(allocate.order(byteOrder).putLong(r02.R).array()); arrayList3.add(ByteBuffer.allocate(8).order(byteOrder).putLong(r02.S).array()); i15 = 5760; str4 = "audio/opus"; list3 = arrayList3; str12 = str4; i12 = 3; int i442222222222222222222222 = i15; list8 = list3; i13 = i442222222222222222222222; i30 = -1; str = null; list4 = list8; bArr = r02.N; if (bArr != null) { } int i322222222222222222222222222222222222 = (r02.V ? 1 : 0) | 0 | (r02.U ? 2 : 0); bVar = new f0.b(); if (o.k(str12)) { } str8 = r02.f45358a; if (str8 != null) { } bVar.b(i31); bVar.f32282k = str12; bVar.f32283l = i13; bVar.f32274c = r02.W; bVar.f32275d = i322222222222222222222222222222222222; bVar.f32284m = list4; bVar.f32279h = str; bVar.f32285n = r02.f45369l; f0 a112222222222222222222222222222222222 = bVar.a(); x c132222222222222222222222222222222222 = kVar2.c(r02.f45360c, i12); r02.X = c132222222222222222222222222222222222; c132222222222222222222222222222222222.d(a112222222222222222222222222222222222); this.f45333c.put(r02.f45360c, r02); break; default: throw r0.a("Unrecognized codec identifier.", null); } } this.f45351u = null; } @Override public final void g(k kVar) { this.f45331a0 = kVar; } @Override public final int h(j jVar, n nVar) { int i10; int i11; String str; long j10; int i12; int[] iArr; boolean z10; boolean z11 = false; this.F = false; boolean z12 = true; boolean z13 = true; while (z13 && !this.F) { z5.b bVar = (z5.b) this.f45330a; c0.a.g(bVar.f45318d); boolean z14 = z11; boolean z15 = z12; while (true) { b.C0317b peek = bVar.f45316b.peek(); if (peek == null || jVar.getPosition() < peek.f45323b) { if (bVar.f45319e == 0) { long c10 = bVar.f45317c.c(jVar, z15, z14, 4); if (c10 == -2) { jVar.n(); while (true) { jVar.r(bVar.f45315a, z14 ? 1 : 0, 4); int b10 = f.b(bVar.f45315a[z14 ? 1 : 0]); if (b10 != -1 && b10 <= 4) { int a10 = (int) f.a(bVar.f45315a, b10, z14); Objects.requireNonNull(e.this); if (a10 == 357149030 || a10 == 524531317 || a10 == 475249515 || a10 == 374648427) { jVar.o(b10); c10 = a10; } } jVar.o(z15 ? 1 : 0); } } if (c10 == -1) { z13 = false; } else { bVar.f45320f = (int) c10; bVar.f45319e = z15 ? 1 : 0; } } if (bVar.f45319e == z15) { bVar.f45321g = bVar.f45317c.c(jVar, z14, z15, 8); bVar.f45319e = 2; } z5.c cVar = bVar.f45318d; int i13 = bVar.f45320f; Objects.requireNonNull(e.this); switch (i13) { case 131: case 136: case 155: case 159: case 176: case 179: case 186: case 215: case 231: case 238: case 241: case 251: case 16871: case 16980: case 17029: case 17143: case 18401: case 18408: case 20529: case 20530: case 21420: case 21432: case 21680: case 21682: case 21690: case 21930: case 21945: case 21946: case 21947: case 21948: case 21949: case 21998: case 22186: case 22203: case 25188: case 30321: case 2352003: case 2807729: i10 = 2; break; case 134: case 17026: case 21358: case 2274716: i10 = 3; break; case 160: case 166: case 174: case 183: case 187: case 224: case 225: case 16868: case 18407: case 19899: case 20532: case 20533: case 21936: case 21968: case 25152: case 28032: case 30113: case 30320: case 290298740: case 357149030: case 374648427: case 408125543: case 440786851: case 475249515: case 524531317: i10 = 1; break; case 161: case 163: case 165: case 16877: case 16981: case 18402: case 21419: case 25506: case 30322: i10 = 4; break; case 181: case 17545: case 21969: case 21970: case 21971: case 21972: case 21973: case 21974: case 21975: case 21976: case 21977: case 21978: case 30323: case 30324: case 30325: i10 = 5; break; default: i10 = 0; break; } if (i10 == 0) { jVar.o((int) bVar.f45321g); z14 = false; bVar.f45319e = 0; z15 = true; } else if (i10 == z15) { long position = jVar.getPosition(); bVar.f45316b.push(new b.C0317b(bVar.f45320f, bVar.f45321g + position, null)); z5.c cVar2 = bVar.f45318d; int i14 = bVar.f45320f; long j11 = bVar.f45321g; e eVar = e.this; c0.a.g(eVar.f45331a0); if (i14 == 160) { i11 = 0; eVar.Q = false; } else if (i14 == 174) { i11 = 0; eVar.f45351u = new c(); } else if (i14 != 187) { if (i14 == 19899) { eVar.f45353w = -1; eVar.f45354x = -1L; } else if (i14 == 20533) { eVar.c(i14); eVar.f45351u.f45365h = true; } else if (i14 == 21968) { eVar.c(i14); eVar.f45351u.f45381x = true; } else if (i14 == 408125543) { long j12 = eVar.f45347q; if (j12 != -1 && j12 != position) { throw r0.a("Multiple Segment elements not supported", null); } eVar.f45347q = position; eVar.f45346p = j11; } else if (i14 == 475249515) { eVar.C = new g(1); eVar.D = new g(1); } else if (i14 == 524531317 && !eVar.f45352v) { if (!eVar.f45334d || eVar.f45356z == -1) { eVar.f45331a0.k(new u.b(eVar.f45350t, 0L)); eVar.f45352v = true; } else { eVar.f45355y = true; } } i11 = 0; } else { i11 = 0; eVar.E = false; } bVar.f45319e = i11; } else if (i10 == 2) { long j13 = bVar.f45321g; if (j13 > 8) { StringBuilder a11 = android.support.v4.media.b.a("Invalid integer size: "); a11.append(bVar.f45321g); throw r0.a(a11.toString(), null); } z5.c cVar3 = bVar.f45318d; int i15 = bVar.f45320f; long a12 = bVar.a(jVar, (int) j13); e eVar2 = e.this; Objects.requireNonNull(eVar2); if (i15 != 20529) { if (i15 != 20530) { switch (i15) { case 131: eVar2.c(i15); eVar2.f45351u.f45361d = (int) a12; break; case 136: eVar2.c(i15); eVar2.f45351u.V = a12 == 1; break; case 155: eVar2.I = eVar2.m(a12); break; case 159: eVar2.c(i15); eVar2.f45351u.O = (int) a12; break; case 176: eVar2.c(i15); eVar2.f45351u.f45370m = (int) a12; break; case 179: eVar2.b(i15); eVar2.C.a(eVar2.m(a12)); break; case 186: eVar2.c(i15); eVar2.f45351u.f45371n = (int) a12; break; case 215: eVar2.c(i15); eVar2.f45351u.f45360c = (int) a12; break; case 231: eVar2.B = eVar2.m(a12); break; case 238: eVar2.P = (int) a12; break; case 241: if (!eVar2.E) { eVar2.b(i15); eVar2.D.a(a12); eVar2.E = true; break; } break; case 251: eVar2.Q = true; break; case 16871: eVar2.c(i15); eVar2.f45351u.f45364g = (int) a12; break; case 16980: if (a12 != 3) { throw z5.a.a("ContentCompAlgo ", a12, " not supported", null); } break; case 17029: if (a12 < 1 || a12 > 2) { throw z5.a.a("DocTypeReadVersion ", a12, " not supported", null); } break; case 17143: if (a12 != 1) { throw z5.a.a("EBMLReadVersion ", a12, " not supported", null); } break; case 18401: if (a12 != 5) { throw z5.a.a("ContentEncAlgo ", a12, " not supported", null); } break; case 18408: if (a12 != 1) { throw z5.a.a("AESSettingsCipherMode ", a12, " not supported", null); } break; case 21420: eVar2.f45354x = a12 + eVar2.f45347q; break; case 21432: int i16 = (int) a12; eVar2.c(i15); if (i16 != 0) { if (i16 != 1) { if (i16 != 3) { if (i16 == 15) { eVar2.f45351u.f45380w = 3; break; } } else { eVar2.f45351u.f45380w = 1; break; } } else { eVar2.f45351u.f45380w = 2; break; } } else { eVar2.f45351u.f45380w = 0; break; } break; case 21680: eVar2.c(i15); eVar2.f45351u.f45372o = (int) a12; break; case 21682: eVar2.c(i15); eVar2.f45351u.f45374q = (int) a12; break; case 21690: eVar2.c(i15); eVar2.f45351u.f45373p = (int) a12; break; case 21930: eVar2.c(i15); eVar2.f45351u.U = a12 == 1; break; case 21998: eVar2.c(i15); eVar2.f45351u.f45363f = (int) a12; break; case 22186: eVar2.c(i15); eVar2.f45351u.R = a12; break; case 22203: eVar2.c(i15); eVar2.f45351u.S = a12; break; case 25188: eVar2.c(i15); eVar2.f45351u.P = (int) a12; break; case 30321: eVar2.c(i15); int i17 = (int) a12; if (i17 != 0) { if (i17 != 1) { if (i17 != 2) { if (i17 == 3) { eVar2.f45351u.f45375r = 3; break; } } else { eVar2.f45351u.f45375r = 2; break; } } else { eVar2.f45351u.f45375r = 1; break; } } else { eVar2.f45351u.f45375r = 0; break; } break; case 2352003: eVar2.c(i15); eVar2.f45351u.f45362e = (int) a12; break; case 2807729: eVar2.f45348r = a12; break; default: switch (i15) { case 21945: eVar2.c(i15); int i18 = (int) a12; if (i18 != 1) { if (i18 == 2) { eVar2.f45351u.A = 1; break; } } else { eVar2.f45351u.A = 2; break; } break; case 21946: eVar2.c(i15); int c11 = n7.b.c((int) a12); if (c11 != -1) { eVar2.f45351u.f45383z = c11; break; } break; case 21947: eVar2.c(i15); eVar2.f45351u.f45381x = true; int b11 = n7.b.b((int) a12); if (b11 != -1) { eVar2.f45351u.f45382y = b11; break; } break; case 21948: eVar2.c(i15); eVar2.f45351u.B = (int) a12; break; case 21949: eVar2.c(i15); eVar2.f45351u.C = (int) a12; break; } } } else if (a12 != 1) { throw z5.a.a("ContentEncodingScope ", a12, " not supported", null); } } else if (a12 != 0) { throw z5.a.a("ContentEncodingOrder ", a12, " not supported", null); } bVar.f45319e = 0; } else if (i10 == 3) { long j14 = bVar.f45321g; if (j14 > 2147483647L) { StringBuilder a13 = android.support.v4.media.b.a("String element size: "); a13.append(bVar.f45321g); throw r0.a(a13.toString(), null); } z5.c cVar4 = bVar.f45318d; int i19 = bVar.f45320f; int i20 = (int) j14; if (i20 == 0) { str = ""; } else { byte[] bArr = new byte[i20]; jVar.readFully(bArr, 0, i20); while (i20 > 0) { int i21 = i20 - 1; if (bArr[i21] == 0) { i20 = i21; } else { str = new String(bArr, 0, i20); } } str = new String(bArr, 0, i20); } e eVar3 = e.this; Objects.requireNonNull(eVar3); if (i19 == 134) { eVar3.c(i19); eVar3.f45351u.f45359b = str; } else if (i19 != 17026) { if (i19 == 21358) { eVar3.c(i19); eVar3.f45351u.f45358a = str; } else if (i19 == 2274716) { eVar3.c(i19); eVar3.f45351u.W = str; } } else if (!"webm".equals(str) && !"matroska".equals(str)) { throw r0.a("DocType " + str + " not supported", null); } bVar.f45319e = 0; } else if (i10 == 4) { z5.c cVar5 = bVar.f45318d; int i22 = bVar.f45320f; int i23 = (int) bVar.f45321g; e eVar4 = e.this; Objects.requireNonNull(eVar4); if (i22 == 161 || i22 == 163) { if (eVar4.G == 0) { eVar4.M = (int) eVar4.f45332b.c(jVar, z14, z15, 8); eVar4.N = eVar4.f45332b.f45387c; eVar4.I = -9223372036854775807L; eVar4.G = z15 ? 1 : 0; eVar4.f45337g.B(z14 ? 1 : 0); } c cVar6 = eVar4.f45333c.get(eVar4.M); if (cVar6 == null) { jVar.o(i23 - eVar4.N); eVar4.G = z14 ? 1 : 0; } else { Objects.requireNonNull(cVar6.X); if (eVar4.G == z15) { eVar4.k(jVar, 3); int i24 = (eVar4.f45337g.f36467a[2] & 6) >> (z15 ? 1 : 0); byte b12 = 255; if (i24 == 0) { eVar4.K = z15 ? 1 : 0; int[] f10 = f(eVar4.L, z15 ? 1 : 0); eVar4.L = f10; f10[z14 ? 1 : 0] = (i23 - eVar4.N) - 3; } else { eVar4.k(jVar, 4); int i25 = (eVar4.f45337g.f36467a[3] & 255) + (z15 ? 1 : 0); eVar4.K = i25; int[] f11 = f(eVar4.L, i25); eVar4.L = f11; if (i24 == 2) { int i26 = (i23 - eVar4.N) - 4; int i27 = eVar4.K; Arrays.fill(f11, z14 ? 1 : 0, i27, i26 / i27); } else { int i28 = 4; if (i24 != z15) { if (i24 != 3) { throw u5.z.a("Unexpected lacing value: ", i24, null); } int i29 = 0; int i30 = 0; ?? r32 = z14; boolean z16 = z15; while (true) { int i31 = eVar4.K; if (i29 < i31 - 1) { eVar4.L[i29] = r32; i28++; eVar4.k(jVar, i28); int i32 = i28 - 1; if (eVar4.f45337g.f36467a[i32] == 0) { throw r0.a("No valid varint length mask found", null); } int i33 = 8; int i34 = 0; ?? r42 = z16; while (true) { if (i34 < i33) { int i35 = r42 << (7 - i34); if ((eVar4.f45337g.f36467a[i32] & i35) != 0) { int i36 = i28 + i34; eVar4.k(jVar, i36); j10 = (~i35) & eVar4.f45337g.f36467a[i32] & b12; int i37 = i32 + 1; while (i37 < i36) { j10 = (j10 << 8) | (eVar4.f45337g.f36467a[i37] & 255); i37++; i36 = i36; } int i38 = i36; if (i29 > 0) { j10 -= (1 << ((i34 * 7) + 6)) - 1; } i28 = i38; } else { i34++; i33 = 8; r42 = 1; b12 = 255; } } else { j10 = 0; } } if (j10 >= -2147483648L && j10 <= 2147483647L) { int i39 = (int) j10; int[] iArr2 = eVar4.L; if (i29 != 0) { i39 += iArr2[i29 - 1]; } iArr2[i29] = i39; i30 += iArr2[i29]; i29++; r32 = 0; z16 = true; b12 = 255; } } else { eVar4.L[i31 - 1] = r1.e.a(i23, eVar4.N, i28, i30); } } throw r0.a("EBML lacing sample size out of range.", null); } int i40 = 0; int i41 = 0; while (true) { int i42 = eVar4.K; if (i40 < i42 - 1) { eVar4.L[i40] = z14 ? 1 : 0; do { i28 += z15 ? 1 : 0; eVar4.k(jVar, i28); i12 = eVar4.f45337g.f36467a[i28 - 1] & 255; iArr = eVar4.L; iArr[i40] = iArr[i40] + i12; } while (i12 == 255); i41 += iArr[i40]; i40++; } else { eVar4.L[i42 - 1] = r1.e.a(i23, eVar4.N, i28, i41); } } } } byte[] bArr2 = eVar4.f45337g.f36467a; eVar4.H = eVar4.m((bArr2[1] & 255) | (bArr2[0] << 8)) + eVar4.B; eVar4.O = (cVar6.f45361d == 2 || (i22 == 163 && (eVar4.f45337g.f36467a[2] & 128) == 128)) ? 1 : 0; eVar4.G = 2; eVar4.J = 0; } if (i22 == 163) { while (true) { int i43 = eVar4.J; if (i43 < eVar4.K) { eVar4.d(cVar6, ((eVar4.J * cVar6.f45362e) / 1000) + eVar4.H, eVar4.O, eVar4.n(jVar, cVar6, eVar4.L[i43]), 0); eVar4.J++; } else { eVar4.G = 0; } } } else { while (true) { int i44 = eVar4.J; if (i44 < eVar4.K) { int[] iArr3 = eVar4.L; iArr3[i44] = eVar4.n(jVar, cVar6, iArr3[i44]); eVar4.J++; } } } } } else if (i22 != 165) { if (i22 == 16877) { eVar4.c(i22); c cVar7 = eVar4.f45351u; int i45 = cVar7.f45364g; if (i45 == 1685485123 || i45 == 1685480259) { byte[] bArr3 = new byte[i23]; cVar7.N = bArr3; jVar.readFully(bArr3, z14 ? 1 : 0, i23); } else { jVar.o(i23); } } else if (i22 == 16981) { eVar4.c(i22); byte[] bArr4 = new byte[i23]; eVar4.f45351u.f45366i = bArr4; jVar.readFully(bArr4, z14 ? 1 : 0, i23); } else if (i22 == 18402) { byte[] bArr5 = new byte[i23]; jVar.readFully(bArr5, z14 ? 1 : 0, i23); eVar4.c(i22); eVar4.f45351u.f45367j = new x.a(z15 ? 1 : 0, bArr5, z14 ? 1 : 0, z14 ? 1 : 0); } else if (i22 == 21419) { Arrays.fill(eVar4.f45339i.f36467a, z14 ? (byte) 1 : (byte) 0); jVar.readFully(eVar4.f45339i.f36467a, 4 - i23, i23); eVar4.f45339i.F(z14 ? 1 : 0); eVar4.f45353w = (int) eVar4.f45339i.v(); } else if (i22 == 25506) { eVar4.c(i22); byte[] bArr6 = new byte[i23]; eVar4.f45351u.f45368k = bArr6; jVar.readFully(bArr6, z14 ? 1 : 0, i23); } else { if (i22 != 30322) { throw u5.z.a("Unexpected id: ", i22, null); } eVar4.c(i22); byte[] bArr7 = new byte[i23]; eVar4.f45351u.f45379v = bArr7; jVar.readFully(bArr7, z14 ? 1 : 0, i23); } } else if (eVar4.G == 2) { c cVar8 = eVar4.f45333c.get(eVar4.M); if (eVar4.P == 4 && "V_VP9".equals(cVar8.f45359b)) { s sVar = eVar4.f45344n; byte[] bArr8 = sVar.f36467a; if (bArr8.length < i23) { bArr8 = new byte[i23]; } sVar.D(bArr8, i23); jVar.readFully(eVar4.f45344n.f36467a, z14 ? 1 : 0, i23); } else { jVar.o(i23); } } bVar.f45319e = 0; } else { if (i10 != 5) { throw u5.z.a("Invalid element type ", i10, null); } long j15 = bVar.f45321g; if (j15 != 4 && j15 != 8) { StringBuilder a14 = android.support.v4.media.b.a("Invalid float size: "); a14.append(bVar.f45321g); throw r0.a(a14.toString(), null); } z5.c cVar9 = bVar.f45318d; int i46 = bVar.f45320f; int i47 = (int) j15; double intBitsToFloat = i47 == 4 ? Float.intBitsToFloat((int) r9) : Double.longBitsToDouble(bVar.a(jVar, i47)); e eVar5 = e.this; Objects.requireNonNull(eVar5); if (i46 == 181) { eVar5.c(i46); eVar5.f45351u.Q = (int) intBitsToFloat; } else if (i46 != 17545) { switch (i46) { case 21969: eVar5.c(i46); eVar5.f45351u.D = (float) intBitsToFloat; break; case 21970: eVar5.c(i46); eVar5.f45351u.E = (float) intBitsToFloat; break; case 21971: eVar5.c(i46); eVar5.f45351u.F = (float) intBitsToFloat; break; case 21972: eVar5.c(i46); eVar5.f45351u.G = (float) intBitsToFloat; break; case 21973: eVar5.c(i46); eVar5.f45351u.H = (float) intBitsToFloat; break; case 21974: eVar5.c(i46); eVar5.f45351u.I = (float) intBitsToFloat; break; case 21975: eVar5.c(i46); eVar5.f45351u.J = (float) intBitsToFloat; break; case 21976: eVar5.c(i46); eVar5.f45351u.K = (float) intBitsToFloat; break; case 21977: eVar5.c(i46); eVar5.f45351u.L = (float) intBitsToFloat; break; case 21978: eVar5.c(i46); eVar5.f45351u.M = (float) intBitsToFloat; break; default: switch (i46) { case 30323: eVar5.c(i46); eVar5.f45351u.f45376s = (float) intBitsToFloat; break; case 30324: eVar5.c(i46); eVar5.f45351u.f45377t = (float) intBitsToFloat; break; case 30325: eVar5.c(i46); eVar5.f45351u.f45378u = (float) intBitsToFloat; break; } } } else { eVar5.f45349s = (long) intBitsToFloat; } bVar.f45319e = z14 ? 1 : 0; } } else { e.this.e(bVar.f45316b.pop().f45322a); } } z13 = true; if (z13) { long position2 = jVar.getPosition(); if (this.f45355y) { this.A = position2; nVar.f37218a = this.f45356z; this.f45355y = false; } else { if (this.f45352v) { long j16 = this.A; if (j16 != -1) { nVar.f37218a = j16; this.A = -1L; } } z10 = false; if (!z10) { return 1; } } z10 = true; if (!z10) { } } z11 = false; z12 = true; } if (z13) { return 0; } for (int i48 = 0; i48 < this.f45333c.size(); i48++) { c valueAt = this.f45333c.valueAt(i48); Objects.requireNonNull(valueAt.X); y yVar = valueAt.T; if (yVar != null) { yVar.a(valueAt.X, valueAt.f45367j); } } return -1; } @Override public final boolean i(j jVar) { boolean z10 = true; r1.g gVar = new r1.g(1, (a0.a) null); long length = jVar.getLength(); long j10 = 1024; if (length != -1 && length <= 1024) { j10 = length; } int i10 = (int) j10; jVar.r(((s) gVar.f39639b).f36467a, 0, 4); gVar.f39640c = 4; for (long v10 = ((s) gVar.f39639b).v(); v10 != 440786851; v10 = ((v10 << 8) & (-256)) | (((s) gVar.f39639b).f36467a[0] & 255)) { int i11 = gVar.f39640c + 1; gVar.f39640c = i11; if (i11 == i10) { return false; } jVar.r(((s) gVar.f39639b).f36467a, 0, 1); } long f10 = gVar.f(jVar); long j11 = gVar.f39640c; if (f10 != Long.MIN_VALUE && (length == -1 || j11 + f10 < length)) { while (true) { long j12 = gVar.f39640c; long j13 = j11 + f10; if (j12 < j13) { if (gVar.f(jVar) == Long.MIN_VALUE) { return false; } long f11 = gVar.f(jVar); if (f11 < 0 || f11 > 2147483647L) { return false; } if (f11 != 0) { int i12 = (int) f11; jVar.k(i12); gVar.f39640c += i12; } } } } z10 = false; return z10; } public final void k(j jVar, int i10) { s sVar = this.f45337g; if (sVar.f36469c >= i10) { return; } byte[] bArr = sVar.f36467a; if (bArr.length < i10) { sVar.b(Math.max(bArr.length * 2, i10)); } s sVar2 = this.f45337g; byte[] bArr2 = sVar2.f36467a; int i11 = sVar2.f36469c; jVar.readFully(bArr2, i11, i10 - i11); this.f45337g.E(i10); } public final void l() { this.R = 0; this.S = 0; this.T = 0; this.U = false; this.V = false; this.W = false; this.X = 0; this.Y = (byte) 0; this.Z = false; this.f45340j.B(0); } public final long m(long j10) { long j11 = this.f45348r; if (j11 != -9223372036854775807L) { return z.S(j10, j11, 1000L); } throw r0.a("Can't scale timecode prior to timecodeScale being set.", null); } public final int n(j jVar, c cVar, int i10) { int i11; if ("S_TEXT/UTF8".equals(cVar.f45359b)) { o(jVar, f45324b0, i10); int i12 = this.S; l(); return i12; } if ("S_TEXT/ASS".equals(cVar.f45359b)) { o(jVar, f45326d0, i10); int i13 = this.S; l(); return i13; } if ("S_TEXT/WEBVTT".equals(cVar.f45359b)) { o(jVar, f45327e0, i10); int i14 = this.S; l(); return i14; } x xVar = cVar.X; if (!this.U) { if (cVar.f45365h) { this.O &= -1073741825; if (!this.V) { jVar.readFully(this.f45337g.f36467a, 0, 1); this.R++; byte[] bArr = this.f45337g.f36467a; if ((bArr[0] & 128) == 128) { throw r0.a("Extension bit is set in signal byte", null); } this.Y = bArr[0]; this.V = true; } byte b10 = this.Y; if ((b10 & 1) == 1) { boolean z10 = (b10 & 2) == 2; this.O |= 1073741824; if (!this.Z) { jVar.readFully(this.f45342l.f36467a, 0, 8); this.R += 8; this.Z = true; s sVar = this.f45337g; sVar.f36467a[0] = (byte) ((z10 ? 128 : 0) | 8); sVar.F(0); xVar.f(this.f45337g, 1, 1); this.S++; this.f45342l.F(0); xVar.f(this.f45342l, 8, 1); this.S += 8; } if (z10) { if (!this.W) { jVar.readFully(this.f45337g.f36467a, 0, 1); this.R++; this.f45337g.F(0); this.X = this.f45337g.u(); this.W = true; } int i15 = this.X * 4; this.f45337g.B(i15); jVar.readFully(this.f45337g.f36467a, 0, i15); this.R += i15; short s4 = (short) ((this.X / 2) + 1); int i16 = (s4 * 6) + 2; ByteBuffer byteBuffer = this.f45345o; if (byteBuffer == null || byteBuffer.capacity() < i16) { this.f45345o = ByteBuffer.allocate(i16); } this.f45345o.position(0); this.f45345o.putShort(s4); int i17 = 0; int i18 = 0; while (true) { i11 = this.X; if (i17 >= i11) { break; } int x10 = this.f45337g.x(); if (i17 % 2 == 0) { this.f45345o.putShort((short) (x10 - i18)); } else { this.f45345o.putInt(x10 - i18); } i17++; i18 = x10; } int i19 = (i10 - this.R) - i18; if (i11 % 2 == 1) { this.f45345o.putInt(i19); } else { this.f45345o.putShort((short) i19); this.f45345o.putInt(0); } this.f45343m.D(this.f45345o.array(), i16); xVar.f(this.f45343m, i16, 1); this.S += i16; } } } else { byte[] bArr2 = cVar.f45366i; if (bArr2 != null) { s sVar2 = this.f45340j; int length = bArr2.length; sVar2.f36467a = bArr2; sVar2.f36469c = length; sVar2.f36468b = 0; } } if (cVar.f45363f > 0) { this.O |= 268435456; this.f45344n.B(0); this.f45337g.B(4); s sVar3 = this.f45337g; byte[] bArr3 = sVar3.f36467a; bArr3[0] = (byte) ((i10 >> 24) & 255); bArr3[1] = (byte) ((i10 >> 16) & 255); bArr3[2] = (byte) ((i10 >> 8) & 255); bArr3[3] = (byte) (i10 & 255); xVar.f(sVar3, 4, 2); this.S += 4; } this.U = true; } int i20 = i10 + this.f45340j.f36469c; if (!"V_MPEG4/ISO/AVC".equals(cVar.f45359b) && !"V_MPEGH/ISO/HEVC".equals(cVar.f45359b)) { if (cVar.T != null) { c0.a.f(this.f45340j.f36469c == 0); cVar.T.c(jVar); } while (true) { int i21 = this.R; if (i21 >= i20) { break; } int p10 = p(jVar, xVar, i20 - i21); this.R += p10; this.S += p10; } } else { byte[] bArr4 = this.f45336f.f36467a; bArr4[0] = 0; bArr4[1] = 0; bArr4[2] = 0; int i22 = cVar.Y; int i23 = 4 - i22; while (this.R < i20) { int i24 = this.T; if (i24 == 0) { int min = Math.min(i22, this.f45340j.a()); jVar.readFully(bArr4, i23 + min, i22 - min); if (min > 0) { s sVar4 = this.f45340j; System.arraycopy(sVar4.f36467a, sVar4.f36468b, bArr4, i23, min); sVar4.f36468b += min; } this.R += i22; this.f45336f.F(0); this.T = this.f45336f.x(); this.f45335e.F(0); xVar.e(this.f45335e, 4); this.S += 4; } else { int p11 = p(jVar, xVar, i24); this.R += p11; this.S += p11; this.T -= p11; } } } if ("A_VORBIS".equals(cVar.f45359b)) { this.f45338h.F(0); xVar.e(this.f45338h, 4); this.S += 4; } int i25 = this.S; l(); return i25; } public final void o(j jVar, byte[] bArr, int i10) { int length = bArr.length + i10; s sVar = this.f45341k; byte[] bArr2 = sVar.f36467a; if (bArr2.length < length) { sVar.C(Arrays.copyOf(bArr, length + i10)); } else { System.arraycopy(bArr, 0, bArr2, 0, bArr.length); } jVar.readFully(this.f45341k.f36467a, bArr.length, i10); this.f45341k.F(0); this.f45341k.E(length); } public final int p(j jVar, x xVar, int i10) { int a10 = this.f45340j.a(); if (a10 <= 0) { return xVar.a(jVar, i10, false); } int min = Math.min(i10, a10); xVar.e(this.f45340j, min); return min; } @Override public final void release() { } }