- 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
220 lines
5.2 KiB
Java
220 lines
5.2 KiB
Java
package com.applovin.impl;
|
|
|
|
import com.applovin.impl.dp;
|
|
import com.applovin.impl.ij;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.C;
|
|
import java.io.EOFException;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class j0 implements k8 {
|
|
public static final o8 m = new o8() { // from class: com.applovin.impl.j0$$ExternalSyntheticLambda0
|
|
@Override // com.applovin.impl.o8
|
|
public final k8[] a() {
|
|
k8[] b;
|
|
b = j0.b();
|
|
return b;
|
|
}
|
|
};
|
|
private final int a;
|
|
private final k0 b;
|
|
private final bh c;
|
|
private final bh d;
|
|
private final ah e;
|
|
private m8 f;
|
|
private long g;
|
|
private long h;
|
|
private int i;
|
|
private boolean j;
|
|
private boolean k;
|
|
private boolean l;
|
|
|
|
@Override // com.applovin.impl.k8
|
|
public void a() {
|
|
}
|
|
|
|
public j0() {
|
|
this(0);
|
|
}
|
|
|
|
public j0(int i) {
|
|
this.a = (i & 2) != 0 ? i | 1 : i;
|
|
this.b = new k0(true);
|
|
this.c = new bh(2048);
|
|
this.i = -1;
|
|
this.h = -1L;
|
|
bh bhVar = new bh(10);
|
|
this.d = bhVar;
|
|
this.e = new ah(bhVar.c());
|
|
}
|
|
|
|
private int c(l8 l8Var) {
|
|
int i = 0;
|
|
while (true) {
|
|
l8Var.c(this.d.c(), 0, 10);
|
|
this.d.f(0);
|
|
if (this.d.z() != 4801587) {
|
|
break;
|
|
}
|
|
this.d.g(3);
|
|
int v = this.d.v();
|
|
i += v + 10;
|
|
l8Var.c(v);
|
|
}
|
|
l8Var.b();
|
|
l8Var.c(i);
|
|
if (this.h == -1) {
|
|
this.h = i;
|
|
}
|
|
return i;
|
|
}
|
|
|
|
private void b(l8 l8Var) {
|
|
if (this.j) {
|
|
return;
|
|
}
|
|
this.i = -1;
|
|
l8Var.b();
|
|
long j = 0;
|
|
if (l8Var.f() == 0) {
|
|
c(l8Var);
|
|
}
|
|
int i = 0;
|
|
int i2 = 0;
|
|
while (l8Var.b(this.d.c(), 0, 2, true)) {
|
|
try {
|
|
this.d.f(0);
|
|
if (!k0.a(this.d.C())) {
|
|
break;
|
|
}
|
|
if (!l8Var.b(this.d.c(), 0, 4, true)) {
|
|
break;
|
|
}
|
|
this.e.c(14);
|
|
int a = this.e.a(13);
|
|
if (a > 6) {
|
|
j += a;
|
|
i2++;
|
|
if (i2 == 1000 || !l8Var.a(a - 6, true)) {
|
|
break;
|
|
}
|
|
} else {
|
|
this.j = true;
|
|
throw dh.a("Malformed ADTS stream", null);
|
|
}
|
|
} catch (EOFException unused) {
|
|
}
|
|
}
|
|
i = i2;
|
|
l8Var.b();
|
|
if (i > 0) {
|
|
this.i = (int) (j / i);
|
|
} else {
|
|
this.i = -1;
|
|
}
|
|
this.j = true;
|
|
}
|
|
|
|
private static int a(int i, long j) {
|
|
return (int) (((i * 8) * 1000000) / j);
|
|
}
|
|
|
|
private void b(long j, boolean z) {
|
|
if (this.l) {
|
|
return;
|
|
}
|
|
boolean z2 = (this.a & 1) != 0 && this.i > 0;
|
|
if (z2 && this.b.d() == C.TIME_UNSET && !z) {
|
|
return;
|
|
}
|
|
if (z2 && this.b.d() != C.TIME_UNSET) {
|
|
this.f.a(a(j, (this.a & 2) != 0));
|
|
} else {
|
|
this.f.a(new ij.b(C.TIME_UNSET));
|
|
}
|
|
this.l = true;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ k8[] b() {
|
|
return new k8[]{new j0()};
|
|
}
|
|
|
|
private ij a(long j, boolean z) {
|
|
return new p4(j, this.h, a(this.i, this.b.d()), this.i, z);
|
|
}
|
|
|
|
@Override // com.applovin.impl.k8
|
|
public void a(m8 m8Var) {
|
|
this.f = m8Var;
|
|
this.b.a(m8Var, new dp.d(0, 1));
|
|
m8Var.c();
|
|
}
|
|
|
|
@Override // com.applovin.impl.k8
|
|
public int a(l8 l8Var, th thVar) {
|
|
b1.b(this.f);
|
|
long a = l8Var.a();
|
|
int i = this.a;
|
|
if ((i & 2) != 0 || ((i & 1) != 0 && a != -1)) {
|
|
b(l8Var);
|
|
}
|
|
int a2 = l8Var.a(this.c.c(), 0, 2048);
|
|
boolean z = a2 == -1;
|
|
b(a, z);
|
|
if (z) {
|
|
return -1;
|
|
}
|
|
this.c.f(0);
|
|
this.c.e(a2);
|
|
if (!this.k) {
|
|
this.b.a(this.g, 4);
|
|
this.k = true;
|
|
}
|
|
this.b.a(this.c);
|
|
return 0;
|
|
}
|
|
|
|
@Override // com.applovin.impl.k8
|
|
public void a(long j, long j2) {
|
|
this.k = false;
|
|
this.b.a();
|
|
this.g = j2;
|
|
}
|
|
|
|
@Override // com.applovin.impl.k8
|
|
public boolean a(l8 l8Var) {
|
|
int c = c(l8Var);
|
|
int i = c;
|
|
int i2 = 0;
|
|
int i3 = 0;
|
|
do {
|
|
l8Var.c(this.d.c(), 0, 2);
|
|
this.d.f(0);
|
|
if (k0.a(this.d.C())) {
|
|
i2++;
|
|
if (i2 >= 4 && i3 > 188) {
|
|
return true;
|
|
}
|
|
l8Var.c(this.d.c(), 0, 4);
|
|
this.e.c(14);
|
|
int a = this.e.a(13);
|
|
if (a <= 6) {
|
|
i++;
|
|
l8Var.b();
|
|
l8Var.c(i);
|
|
} else {
|
|
l8Var.c(a - 6);
|
|
i3 += a;
|
|
}
|
|
} else {
|
|
i++;
|
|
l8Var.b();
|
|
l8Var.c(i);
|
|
}
|
|
i2 = 0;
|
|
i3 = 0;
|
|
} while (i - c < 8192);
|
|
return false;
|
|
}
|
|
}
|