discord-jadx/app/src/main/java/c/i/a/c/a2/j0/t.java

83 lines
2.2 KiB
Java

package c.i.a.c.a2.j0;
import android.util.Log;
import c.i.a.c.a2.j;
import c.i.a.c.a2.j0.i0;
import c.i.a.c.i2.w;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.google.android.exoplayer2.Format;
/* compiled from: Id3Reader */
public final class t implements o {
public final w a = new w(10);
public c.i.a.c.a2.w b;
/* renamed from: c reason: collision with root package name */
public boolean f743c;
public long d;
public int e;
public int f;
@Override // c.i.a.c.a2.j0.o
public void b(w wVar) {
AnimatableValueParser.H(this.b);
if (this.f743c) {
int a = wVar.a();
int i = this.f;
if (i < 10) {
int min = Math.min(a, 10 - i);
System.arraycopy(wVar.a, wVar.b, this.a.a, this.f, min);
if (this.f + min == 10) {
this.a.D(0);
if (73 == this.a.s() && 68 == this.a.s() && 51 == this.a.s()) {
this.a.E(3);
this.e = this.a.r() + 10;
} else {
Log.w("Id3Reader", "Discarding invalid ID3 tag");
this.f743c = false;
return;
}
}
}
int min2 = Math.min(a, this.e - this.f);
this.b.c(wVar, min2);
this.f += min2;
}
}
@Override // c.i.a.c.a2.j0.o
public void c() {
this.f743c = false;
}
@Override // c.i.a.c.a2.j0.o
public void d() {
int i;
AnimatableValueParser.H(this.b);
if (this.f743c && (i = this.e) != 0 && this.f == i) {
this.b.d(this.d, 1, i, 0, null);
this.f743c = false;
}
}
@Override // c.i.a.c.a2.j0.o
public void e(j jVar, i0.d dVar) {
dVar.a();
c.i.a.c.a2.w p = jVar.p(dVar.c(), 5);
this.b = p;
Format.b bVar = new Format.b();
bVar.a = dVar.b();
bVar.k = "application/id3";
p.e(bVar.a());
}
@Override // c.i.a.c.a2.j0.o
public void f(long j, int i) {
if ((i & 4) != 0) {
this.f743c = true;
this.d = j;
this.e = 0;
this.f = 0;
}
}
}