116 lines
2.9 KiB
Java
116 lines
2.9 KiB
Java
package c.i.a.c.a2.i0;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import c.i.a.c.a2.i;
|
|
import c.i.a.c.a2.i0.i;
|
|
import c.i.a.c.a2.m;
|
|
import c.i.a.c.a2.n;
|
|
import c.i.a.c.a2.o;
|
|
import c.i.a.c.a2.t;
|
|
import c.i.a.c.i2.f0;
|
|
import c.i.a.c.i2.w;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import java.util.Arrays;
|
|
import java.util.Objects;
|
|
import org.checkerframework.checker.nullness.qual.EnsuresNonNullIf;
|
|
/* compiled from: FlacReader */
|
|
public final class c extends i {
|
|
@Nullable
|
|
public o n;
|
|
@Nullable
|
|
public a o;
|
|
|
|
/* compiled from: FlacReader */
|
|
public static final class a implements g {
|
|
public o a;
|
|
public o.a b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public long f707c = -1;
|
|
public long d = -1;
|
|
|
|
public a(o oVar, o.a aVar) {
|
|
this.a = oVar;
|
|
this.b = aVar;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.i0.g
|
|
public t a() {
|
|
AnimatableValueParser.D(this.f707c != -1);
|
|
return new n(this.a, this.f707c);
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.i0.g
|
|
public long b(i iVar) {
|
|
long j = this.d;
|
|
if (j < 0) {
|
|
return -1;
|
|
}
|
|
long j2 = -(j + 2);
|
|
this.d = -1;
|
|
return j2;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.i0.g
|
|
public void c(long j) {
|
|
long[] jArr = this.b.a;
|
|
this.d = jArr[f0.e(jArr, j, true, true)];
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.i0.i
|
|
public long c(w wVar) {
|
|
byte[] bArr = wVar.a;
|
|
if (!(bArr[0] == -1)) {
|
|
return -1;
|
|
}
|
|
int i = (bArr[2] & 255) >> 4;
|
|
if (i == 6 || i == 7) {
|
|
wVar.E(4);
|
|
wVar.y();
|
|
}
|
|
int c2 = m.c(wVar, i);
|
|
wVar.D(0);
|
|
return (long) c2;
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.i0.i
|
|
@EnsuresNonNullIf(expression = {"#3.format"}, result = false)
|
|
public boolean d(w wVar, long j, i.b bVar) {
|
|
byte[] bArr = wVar.a;
|
|
o oVar = this.n;
|
|
if (oVar == null) {
|
|
o oVar2 = new o(bArr, 17);
|
|
this.n = oVar2;
|
|
bVar.a = oVar2.e(Arrays.copyOfRange(bArr, 9, wVar.f913c), null);
|
|
return true;
|
|
} else if ((bArr[0] & Byte.MAX_VALUE) == 3) {
|
|
o.a m2 = AnimatableValueParser.m2(wVar);
|
|
o b = oVar.b(m2);
|
|
this.n = b;
|
|
this.o = new a(b, m2);
|
|
return true;
|
|
} else {
|
|
if (!(bArr[0] == -1)) {
|
|
return true;
|
|
}
|
|
a aVar = this.o;
|
|
if (aVar != null) {
|
|
aVar.f707c = j;
|
|
bVar.b = aVar;
|
|
}
|
|
Objects.requireNonNull(bVar.a);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.c.a2.i0.i
|
|
public void e(boolean z2) {
|
|
super.e(z2);
|
|
if (z2) {
|
|
this.n = null;
|
|
this.o = null;
|
|
}
|
|
}
|
|
}
|