2021-07-24 02:37:17 +00:00
|
|
|
package c.i.a.c.d2;
|
|
|
|
|
|
|
|
import android.net.Uri;
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
import c.i.a.c.d2.b0;
|
|
|
|
import c.i.a.c.h2.j;
|
|
|
|
import c.i.a.c.h2.l;
|
|
|
|
import c.i.a.c.h2.x;
|
|
|
|
import c.i.a.c.i2.w;
|
|
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Objects;
|
|
|
|
/* compiled from: IcyDataSource */
|
|
|
|
public final class q implements j {
|
|
|
|
public final j a;
|
|
|
|
public final int b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-28 07:39:21 +00:00
|
|
|
public final a f806c;
|
2021-07-24 02:37:17 +00:00
|
|
|
public final byte[] d;
|
|
|
|
public int e;
|
|
|
|
|
|
|
|
/* compiled from: IcyDataSource */
|
|
|
|
public interface a {
|
|
|
|
}
|
|
|
|
|
|
|
|
public q(j jVar, int i, a aVar) {
|
|
|
|
AnimatableValueParser.k(i > 0);
|
|
|
|
this.a = jVar;
|
|
|
|
this.b = i;
|
2021-07-28 07:39:21 +00:00
|
|
|
this.f806c = aVar;
|
2021-07-24 02:37:17 +00:00
|
|
|
this.d = new byte[1];
|
|
|
|
this.e = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.i.a.c.h2.j
|
|
|
|
public long a(l lVar) {
|
|
|
|
throw new UnsupportedOperationException();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.i.a.c.h2.j
|
|
|
|
public void close() {
|
|
|
|
throw new UnsupportedOperationException();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.i.a.c.h2.j
|
|
|
|
public void d(x xVar) {
|
|
|
|
Objects.requireNonNull(xVar);
|
|
|
|
this.a.d(xVar);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.i.a.c.h2.j
|
|
|
|
public Map<String, List<String>> j() {
|
|
|
|
return this.a.j();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.i.a.c.h2.j
|
|
|
|
@Nullable
|
|
|
|
public Uri m() {
|
|
|
|
return this.a.m();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:23:0x0073 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:24:0x0078 A[RETURN] */
|
|
|
|
@Override // c.i.a.c.h2.f
|
|
|
|
public int read(byte[] bArr, int i, int i2) throws IOException {
|
|
|
|
long j;
|
|
|
|
if (this.e == 0) {
|
|
|
|
boolean z2 = true;
|
|
|
|
if (this.a.read(this.d, 0, 1) != -1) {
|
|
|
|
int i3 = (this.d[0] & 255) << 4;
|
|
|
|
if (i3 != 0) {
|
|
|
|
byte[] bArr2 = new byte[i3];
|
|
|
|
int i4 = i3;
|
|
|
|
int i5 = 0;
|
|
|
|
while (true) {
|
|
|
|
if (i4 <= 0) {
|
|
|
|
while (i3 > 0) {
|
|
|
|
int i6 = i3 - 1;
|
|
|
|
if (bArr2[i6] != 0) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
i3 = i6;
|
|
|
|
}
|
|
|
|
if (i3 > 0) {
|
2021-07-28 07:39:21 +00:00
|
|
|
a aVar = this.f806c;
|
2021-07-24 02:37:17 +00:00
|
|
|
w wVar = new w(bArr2, i3);
|
|
|
|
b0.a aVar2 = (b0.a) aVar;
|
|
|
|
if (!aVar2.n) {
|
|
|
|
j = aVar2.j;
|
|
|
|
} else {
|
|
|
|
b0 b0Var = b0.this;
|
|
|
|
Map<String, String> map = b0.i;
|
|
|
|
j = Math.max(b0Var.v(), aVar2.j);
|
|
|
|
}
|
|
|
|
int a2 = wVar.a();
|
|
|
|
c.i.a.c.a2.w wVar2 = aVar2.m;
|
|
|
|
Objects.requireNonNull(wVar2);
|
|
|
|
wVar2.c(wVar, a2);
|
|
|
|
wVar2.d(j, 1, a2, 0, null);
|
|
|
|
aVar2.n = true;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
int read = this.a.read(bArr2, i5, i4);
|
|
|
|
if (read == -1) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
i5 += read;
|
|
|
|
i4 -= read;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (z2) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
this.e = this.b;
|
|
|
|
}
|
|
|
|
z2 = false;
|
|
|
|
if (z2) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int read2 = this.a.read(bArr, i, Math.min(this.e, i2));
|
|
|
|
if (read2 != -1) {
|
|
|
|
this.e -= read2;
|
|
|
|
}
|
|
|
|
return read2;
|
|
|
|
}
|
|
|
|
}
|