discord-jadx/app/src/main/java/c/i/a/c/a2/i0/e.java
2021-07-28 09:39:21 +02:00

77 lines
2.1 KiB
Java

package c.i.a.c.a2.i0;
import c.i.a.c.a2.i;
import c.i.a.c.i2.w;
import com.airbnb.lottie.parser.AnimatableValueParser;
import java.io.IOException;
/* compiled from: OggPacket */
public final class e {
public final f a = new f();
public final w b = new w(new byte[65025], 0);
/* renamed from: c reason: collision with root package name */
public int f709c = -1;
public int d;
public boolean e;
public final int a(int i) {
int i2;
int i3 = 0;
this.d = 0;
do {
int i4 = this.d;
int i5 = i + i4;
f fVar = this.a;
if (i5 >= fVar.d) {
break;
}
int[] iArr = fVar.g;
this.d = i4 + 1;
i2 = iArr[i4 + i];
i3 += i2;
} while (i2 == 255);
return i3;
}
public boolean b(i iVar) throws IOException {
int i;
AnimatableValueParser.D(iVar != null);
if (this.e) {
this.e = false;
this.b.z(0);
}
while (!this.e) {
if (this.f709c < 0) {
if (!this.a.c(iVar, -1) || !this.a.a(iVar, true)) {
return false;
}
f fVar = this.a;
int i2 = fVar.e;
if ((fVar.b & 1) == 1 && this.b.f913c == 0) {
i2 += a(0);
i = this.d + 0;
} else {
i = 0;
}
iVar.l(i2);
this.f709c = i;
}
int a = a(this.f709c);
int i3 = this.f709c + this.d;
if (a > 0) {
w wVar = this.b;
wVar.b(wVar.f913c + a);
w wVar2 = this.b;
iVar.readFully(wVar2.a, wVar2.f913c, a);
w wVar3 = this.b;
wVar3.C(wVar3.f913c + a);
this.e = this.a.g[i3 + -1] != 255;
}
if (i3 == this.a.d) {
i3 = -1;
}
this.f709c = i3;
}
return true;
}
}