- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
124 lines
2.8 KiB
Java
124 lines
2.8 KiB
Java
package com.applovin.impl;
|
|
|
|
import com.mbridge.msdk.playercommon.exoplayer2.C;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class bp {
|
|
private final int a;
|
|
private boolean d;
|
|
private boolean e;
|
|
private boolean f;
|
|
private final ho b = new ho(0);
|
|
private long g = C.TIME_UNSET;
|
|
private long h = C.TIME_UNSET;
|
|
private long i = C.TIME_UNSET;
|
|
private final bh c = new bh();
|
|
|
|
public long a() {
|
|
return this.i;
|
|
}
|
|
|
|
public ho b() {
|
|
return this.b;
|
|
}
|
|
|
|
public boolean c() {
|
|
return this.d;
|
|
}
|
|
|
|
public bp(int i) {
|
|
this.a = i;
|
|
}
|
|
|
|
private int a(l8 l8Var) {
|
|
this.c.a(xp.f);
|
|
this.d = true;
|
|
l8Var.b();
|
|
return 0;
|
|
}
|
|
|
|
private int c(l8 l8Var, th thVar, int i) {
|
|
long a = l8Var.a();
|
|
int min = (int) Math.min(this.a, a);
|
|
long j = a - min;
|
|
if (l8Var.f() != j) {
|
|
thVar.a = j;
|
|
return 1;
|
|
}
|
|
this.c.d(min);
|
|
l8Var.b();
|
|
l8Var.c(this.c.c(), 0, min);
|
|
this.h = b(this.c, i);
|
|
this.f = true;
|
|
return 0;
|
|
}
|
|
|
|
private int b(l8 l8Var, th thVar, int i) {
|
|
int min = (int) Math.min(this.a, l8Var.a());
|
|
long j = 0;
|
|
if (l8Var.f() != j) {
|
|
thVar.a = j;
|
|
return 1;
|
|
}
|
|
this.c.d(min);
|
|
l8Var.b();
|
|
l8Var.c(this.c.c(), 0, min);
|
|
this.g = a(this.c, i);
|
|
this.e = true;
|
|
return 0;
|
|
}
|
|
|
|
public int a(l8 l8Var, th thVar, int i) {
|
|
if (i <= 0) {
|
|
return a(l8Var);
|
|
}
|
|
if (!this.f) {
|
|
return c(l8Var, thVar, i);
|
|
}
|
|
if (this.h == C.TIME_UNSET) {
|
|
return a(l8Var);
|
|
}
|
|
if (!this.e) {
|
|
return b(l8Var, thVar, i);
|
|
}
|
|
long j = this.g;
|
|
if (j == C.TIME_UNSET) {
|
|
return a(l8Var);
|
|
}
|
|
long b = this.b.b(this.h) - this.b.b(j);
|
|
this.i = b;
|
|
if (b < 0) {
|
|
pc.d("TsDurationReader", "Invalid duration: " + this.i + ". Using TIME_UNSET instead.");
|
|
this.i = C.TIME_UNSET;
|
|
}
|
|
return a(l8Var);
|
|
}
|
|
|
|
private long b(bh bhVar, int i) {
|
|
int d = bhVar.d();
|
|
int e = bhVar.e();
|
|
for (int i2 = e - 188; i2 >= d; i2--) {
|
|
if (ep.a(bhVar.c(), d, e, i2)) {
|
|
long a = ep.a(bhVar, i2, i);
|
|
if (a != C.TIME_UNSET) {
|
|
return a;
|
|
}
|
|
}
|
|
}
|
|
return C.TIME_UNSET;
|
|
}
|
|
|
|
private long a(bh bhVar, int i) {
|
|
int e = bhVar.e();
|
|
for (int d = bhVar.d(); d < e; d++) {
|
|
if (bhVar.c()[d] == 71) {
|
|
long a = ep.a(bhVar, d, i);
|
|
if (a != C.TIME_UNSET) {
|
|
return a;
|
|
}
|
|
}
|
|
}
|
|
return C.TIME_UNSET;
|
|
}
|
|
}
|