69 lines
2.1 KiB
Java
69 lines
2.1 KiB
Java
package c.i.a.c.j2;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import c.i.a.c.i2.h;
|
|
import c.i.a.c.i2.u;
|
|
import c.i.a.c.i2.w;
|
|
import c.i.a.c.i2.x;
|
|
import com.google.android.exoplayer2.ParserException;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
/* compiled from: HevcConfig */
|
|
public final class m {
|
|
@Nullable
|
|
public final List<byte[]> a;
|
|
public final int b;
|
|
@Nullable
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final String f921c;
|
|
|
|
public m(@Nullable List<byte[]> list, int i, @Nullable String str) {
|
|
this.a = list;
|
|
this.b = i;
|
|
this.f921c = str;
|
|
}
|
|
|
|
public static m a(w wVar) throws ParserException {
|
|
try {
|
|
wVar.E(21);
|
|
int s2 = wVar.s() & 3;
|
|
int s3 = wVar.s();
|
|
int i = wVar.b;
|
|
int i2 = 0;
|
|
for (int i3 = 0; i3 < s3; i3++) {
|
|
wVar.E(1);
|
|
int x2 = wVar.x();
|
|
for (int i4 = 0; i4 < x2; i4++) {
|
|
int x3 = wVar.x();
|
|
i2 += x3 + 4;
|
|
wVar.E(x3);
|
|
}
|
|
}
|
|
wVar.D(i);
|
|
byte[] bArr = new byte[i2];
|
|
String str = null;
|
|
int i5 = 0;
|
|
for (int i6 = 0; i6 < s3; i6++) {
|
|
int s4 = wVar.s() & 127;
|
|
int x4 = wVar.x();
|
|
for (int i7 = 0; i7 < x4; i7++) {
|
|
int x5 = wVar.x();
|
|
byte[] bArr2 = u.a;
|
|
System.arraycopy(bArr2, 0, bArr, i5, bArr2.length);
|
|
int length = i5 + bArr2.length;
|
|
System.arraycopy(wVar.a, wVar.b, bArr, length, x5);
|
|
if (s4 == 33 && i7 == 0) {
|
|
str = h.b(new x(bArr, length, length + x5));
|
|
}
|
|
i5 = length + x5;
|
|
wVar.E(x5);
|
|
}
|
|
}
|
|
return new m(i2 == 0 ? null : Collections.singletonList(bArr), s2 + 1, str);
|
|
} catch (ArrayIndexOutOfBoundsException e) {
|
|
throw new ParserException("Error parsing HEVC config", e);
|
|
}
|
|
}
|
|
}
|