discord-jadx/app/src/main/java/c/i/a/c/q0.java

2581 lines
85 KiB
Java

package c.i.a.c;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.os.SystemClock;
import android.util.Log;
import android.util.Pair;
import androidx.annotation.CheckResult;
import androidx.annotation.Nullable;
import c.i.a.c.b1;
import c.i.a.c.d2.h0;
import c.i.a.c.d2.v;
import c.i.a.c.d2.y;
import c.i.a.c.f2.l;
import c.i.a.c.f2.m;
import c.i.a.c.h1;
import c.i.a.c.h2.x;
import c.i.a.c.i2.a0;
import c.i.a.c.i2.c0;
import c.i.a.c.i2.f0;
import c.i.a.c.i2.p;
import c.i.a.c.i2.r;
import c.i.a.c.m0;
import c.i.a.c.r1;
import c.i.a.c.u1.c1;
import c.i.a.c.v0;
import c.i.b.b.s;
import c.i.b.b.u;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.google.android.exoplayer2.ExoPlaybackException;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.source.TrackGroupArray;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
/* compiled from: ExoPlayerImplInternal */
public final class q0 implements Handler.Callback, v.a, b1.d, m0.a, h1.a {
public final b1 A;
public final t0 B;
public final long C;
public o1 D;
public c1 E;
public d F;
public boolean G;
public boolean H;
public boolean I;
public boolean J;
public boolean K;
public int L;
public boolean M;
public boolean N;
public boolean O;
public boolean P;
public int Q;
@Nullable
public g R;
public long S;
public int T;
public boolean U;
@Nullable
public ExoPlaybackException V;
public final k1[] i;
public final l1[] j;
public final l k;
public final m l;
public final u0 m;
public final c.i.a.c.h2.d n;
public final c0 o;
public final HandlerThread p;
public final Looper q;
public final r1.c r;
/* renamed from: s reason: collision with root package name */
public final r1.b f943s;
public final long t;
public final boolean u;
public final m0 v;
public final ArrayList<c> w;
/* renamed from: x reason: collision with root package name */
public final c.i.a.c.i2.g f944x;
/* renamed from: y reason: collision with root package name */
public final e f945y;
/* renamed from: z reason: collision with root package name */
public final z0 f946z;
/* compiled from: ExoPlayerImplInternal */
public static final class a {
public final List<b1.c> a;
public final h0 b;
/* renamed from: c reason: collision with root package name */
public final int f947c;
public final long d;
public a(List list, h0 h0Var, int i, long j, p0 p0Var) {
this.a = list;
this.b = h0Var;
this.f947c = i;
this.d = j;
}
}
/* compiled from: ExoPlayerImplInternal */
public static class b {
}
/* compiled from: ExoPlayerImplInternal */
public static final class c implements Comparable<c> {
public final h1 i;
public int j;
public long k;
@Nullable
public Object l;
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
/* JADX WARNING: Code restructure failed: missing block: B:10:0x0015, code lost:
if (r0 != null) goto L_0x0017;
*/
@Override // java.lang.Comparable
public int compareTo(c cVar) {
c cVar2 = cVar;
Object obj = this.l;
int i = 1;
if ((obj == null) == (cVar2.l == null)) {
if (obj == null) {
return 0;
}
int i2 = this.j - cVar2.j;
if (i2 != 0) {
return i2;
}
long j = this.k;
long j2 = cVar2.k;
int i3 = f0.a;
int i4 = (j > j2 ? 1 : (j == j2 ? 0 : -1));
if (i4 >= 0) {
if (i4 == 0) {
i = 0;
}
return i;
}
}
i = -1;
return i;
}
public void f(int i, long j, Object obj) {
this.j = i;
this.k = j;
this.l = obj;
}
}
/* compiled from: ExoPlayerImplInternal */
public static final class d {
public boolean a;
public c1 b;
/* renamed from: c reason: collision with root package name */
public int f948c;
public boolean d;
public int e;
public boolean f;
public int g;
public d(c1 c1Var) {
this.b = c1Var;
}
public void a(int i) {
this.a |= i > 0;
this.f948c += i;
}
public void b(int i) {
boolean z2 = true;
if (!this.d || this.e == 4) {
this.a = true;
this.d = true;
this.e = i;
return;
}
if (i != 4) {
z2 = false;
}
AnimatableValueParser.k(z2);
}
}
/* compiled from: ExoPlayerImplInternal */
public interface e {
}
/* compiled from: ExoPlayerImplInternal */
public static final class f {
public final y.a a;
public final long b;
/* renamed from: c reason: collision with root package name */
public final long f949c;
public final boolean d;
public final boolean e;
public final boolean f;
public f(y.a aVar, long j, long j2, boolean z2, boolean z3, boolean z4) {
this.a = aVar;
this.b = j;
this.f949c = j2;
this.d = z2;
this.e = z3;
this.f = z4;
}
}
/* compiled from: ExoPlayerImplInternal */
public static final class g {
public final r1 a;
public final int b;
/* renamed from: c reason: collision with root package name */
public final long f950c;
public g(r1 r1Var, int i, long j) {
this.a = r1Var;
this.b = i;
this.f950c = j;
}
}
public q0(k1[] k1VarArr, l lVar, m mVar, u0 u0Var, c.i.a.c.h2.d dVar, int i, boolean z2, @Nullable c1 c1Var, o1 o1Var, t0 t0Var, long j, boolean z3, Looper looper, c.i.a.c.i2.g gVar, e eVar) {
this.f945y = eVar;
this.i = k1VarArr;
this.k = lVar;
this.l = mVar;
this.m = u0Var;
this.n = dVar;
this.L = i;
this.M = z2;
this.D = o1Var;
this.B = t0Var;
this.C = j;
this.H = z3;
this.f944x = gVar;
this.t = u0Var.b();
this.u = u0Var.a();
c1 i2 = c1.i(mVar);
this.E = i2;
this.F = new d(i2);
this.j = new l1[k1VarArr.length];
for (int i3 = 0; i3 < k1VarArr.length; i3++) {
k1VarArr[i3].f(i3);
this.j[i3] = k1VarArr[i3].l();
}
this.v = new m0(this, gVar);
this.w = new ArrayList<>();
this.r = new r1.c();
this.f943s = new r1.b();
lVar.a = dVar;
this.U = true;
Handler handler = new Handler(looper);
this.f946z = new z0(c1Var, handler);
this.A = new b1(this, c1Var, handler);
HandlerThread handlerThread = new HandlerThread("ExoPlayer:Playback", -16);
this.p = handlerThread;
handlerThread.start();
Looper looper2 = handlerThread.getLooper();
this.q = looper2;
this.o = gVar.b(looper2, this);
}
public static boolean I(c cVar, r1 r1Var, r1 r1Var2, int i, boolean z2, r1.c cVar2, r1.b bVar) {
Object obj = cVar.l;
if (obj == null) {
Objects.requireNonNull(cVar.i);
Objects.requireNonNull(cVar.i);
long a2 = h0.a(-9223372036854775807L);
h1 h1Var = cVar.i;
Pair<Object, Long> K = K(r1Var, new g(h1Var.d, h1Var.h, a2), false, i, z2, cVar2, bVar);
if (K == null) {
return false;
}
cVar.f(r1Var.b(K.first), ((Long) K.second).longValue(), K.first);
Objects.requireNonNull(cVar.i);
return true;
}
int b2 = r1Var.b(obj);
if (b2 == -1) {
return false;
}
Objects.requireNonNull(cVar.i);
cVar.j = b2;
r1Var2.h(cVar.l, bVar);
if (r1Var2.n(bVar.f952c, cVar2).n) {
Pair<Object, Long> j = r1Var.j(cVar2, bVar, r1Var.h(cVar.l, bVar).f952c, cVar.k + bVar.e);
cVar.f(r1Var.b(j.first), ((Long) j.second).longValue(), j.first);
}
return true;
}
@Nullable
public static Pair<Object, Long> K(r1 r1Var, g gVar, boolean z2, int i, boolean z3, r1.c cVar, r1.b bVar) {
Object L;
r1 r1Var2 = gVar.a;
if (r1Var.q()) {
return null;
}
r1 r1Var3 = r1Var2.q() ? r1Var : r1Var2;
try {
Pair<Object, Long> j = r1Var3.j(cVar, bVar, gVar.b, gVar.f950c);
if (r1Var.equals(r1Var3)) {
return j;
}
if (r1Var.b(j.first) != -1) {
r1Var3.h(j.first, bVar);
return r1Var3.n(bVar.f952c, cVar).n ? r1Var.j(cVar, bVar, r1Var.h(j.first, bVar).f952c, gVar.f950c) : j;
}
if (z2 && (L = L(cVar, bVar, i, z3, j.first, r1Var3, r1Var)) != null) {
return r1Var.j(cVar, bVar, r1Var.h(L, bVar).f952c, -9223372036854775807L);
}
return null;
} catch (IndexOutOfBoundsException unused) {
}
}
@Nullable
public static Object L(r1.c cVar, r1.b bVar, int i, boolean z2, Object obj, r1 r1Var, r1 r1Var2) {
int b2 = r1Var.b(obj);
int i2 = r1Var.i();
int i3 = b2;
int i4 = -1;
for (int i5 = 0; i5 < i2 && i4 == -1; i5++) {
i3 = r1Var.d(i3, bVar, cVar, i, z2);
if (i3 == -1) {
break;
}
i4 = r1Var2.b(r1Var.m(i3));
}
if (i4 == -1) {
return null;
}
return r1Var2.m(i4);
}
public static boolean g0(c1 c1Var, r1.b bVar, r1.c cVar) {
y.a aVar = c1Var.f773c;
r1 r1Var = c1Var.b;
return aVar.a() || r1Var.q() || r1Var.n(r1Var.h(aVar.a, bVar).f952c, cVar).n;
}
public static Format[] j(c.i.a.c.f2.g gVar) {
int length = gVar != null ? gVar.length() : 0;
Format[] formatArr = new Format[length];
for (int i = 0; i < length; i++) {
formatArr[i] = gVar.d(i);
}
return formatArr;
}
public static boolean w(k1 k1Var) {
return k1Var.getState() != 0;
}
public final void A(b bVar) throws ExoPlaybackException {
boolean z2 = true;
this.F.a(1);
b1 b1Var = this.A;
Objects.requireNonNull(bVar);
Objects.requireNonNull(b1Var);
if (b1Var.e() < 0) {
z2 = false;
}
AnimatableValueParser.k(z2);
b1Var.i = null;
r(b1Var.c());
}
public final void B() {
this.F.a(1);
F(false, false, false, true);
this.m.c();
d0(this.E.b.q() ? 4 : 2);
b1 b1Var = this.A;
x c2 = this.n.c();
AnimatableValueParser.D(!b1Var.j);
b1Var.k = c2;
for (int i = 0; i < b1Var.a.size(); i++) {
b1.c cVar = b1Var.a.get(i);
b1Var.g(cVar);
b1Var.h.add(cVar);
}
b1Var.j = true;
this.o.d(2);
}
public final void C() {
F(true, false, true, false);
this.m.e();
d0(1);
this.p.quit();
synchronized (this) {
this.G = true;
notifyAll();
}
}
public final void D(int i, int i2, h0 h0Var) throws ExoPlaybackException {
boolean z2 = true;
this.F.a(1);
b1 b1Var = this.A;
Objects.requireNonNull(b1Var);
if (i < 0 || i > i2 || i2 > b1Var.e()) {
z2 = false;
}
AnimatableValueParser.k(z2);
b1Var.i = h0Var;
b1Var.i(i, i2);
r(b1Var.c());
}
public final void E() throws ExoPlaybackException {
boolean z2;
int i;
float f2 = this.v.c().b;
z0 z0Var = this.f946z;
x0 x0Var = z0Var.h;
x0 x0Var2 = z0Var.i;
x0 x0Var3 = x0Var;
boolean z3 = true;
while (x0Var3 != null && x0Var3.d) {
m i2 = x0Var3.i(f2, this.E.b);
m mVar = x0Var3.n;
int i3 = 0;
if (mVar != null && mVar.f864c.length == i2.f864c.length) {
int i4 = 0;
while (true) {
if (i4 >= i2.f864c.length) {
z2 = true;
break;
} else if (!i2.a(mVar, i4)) {
break;
} else {
i4++;
}
}
}
z2 = false;
if (!z2) {
if (z3) {
z0 z0Var2 = this.f946z;
x0 x0Var4 = z0Var2.h;
boolean m = z0Var2.m(x0Var4);
boolean[] zArr = new boolean[this.i.length];
long a2 = x0Var4.a(i2, this.E.f774s, m, zArr);
c1 c1Var = this.E;
i = 4;
c1 u = u(c1Var.f773c, a2, c1Var.d);
this.E = u;
if (!(u.e == 4 || a2 == u.f774s)) {
this.F.b(4);
H(a2);
}
boolean[] zArr2 = new boolean[this.i.length];
while (true) {
k1[] k1VarArr = this.i;
if (i3 >= k1VarArr.length) {
break;
}
k1 k1Var = k1VarArr[i3];
zArr2[i3] = w(k1Var);
c.i.a.c.d2.f0 f0Var = x0Var4.f1007c[i3];
if (zArr2[i3]) {
if (f0Var != k1Var.h()) {
f(k1Var);
} else if (zArr[i3]) {
k1Var.u(this.S);
}
}
i3++;
}
i(zArr2);
} else {
i = 4;
this.f946z.m(x0Var3);
if (x0Var3.d) {
x0Var3.a(i2, Math.max(x0Var3.f.b, this.S - x0Var3.o), false, new boolean[x0Var3.i.length]);
}
}
q(true);
if (this.E.e != i) {
y();
m0();
this.o.d(2);
return;
}
return;
}
if (x0Var3 == x0Var2) {
z3 = false;
}
x0Var3 = x0Var3.l;
}
}
/* JADX WARNING: Removed duplicated region for block: B:33:0x00b8 */
/* JADX WARNING: Removed duplicated region for block: B:34:0x00ba */
/* JADX WARNING: Removed duplicated region for block: B:37:0x00c1 */
/* JADX WARNING: Removed duplicated region for block: B:38:0x00c4 */
/* JADX WARNING: Removed duplicated region for block: B:41:0x00ca */
/* JADX WARNING: Removed duplicated region for block: B:42:0x00cd */
/* JADX WARNING: Removed duplicated region for block: B:45:0x00d3 */
/* JADX WARNING: Removed duplicated region for block: B:46:0x00d8 */
/* JADX WARNING: Removed duplicated region for block: B:49:0x00fc */
public final void F(boolean z2, boolean z3, boolean z4, boolean z5) {
long j;
y.a aVar;
long j2;
boolean z6;
List list;
this.o.a.removeMessages(2);
this.J = false;
m0 m0Var = this.v;
m0Var.n = false;
a0 a0Var = m0Var.i;
if (a0Var.j) {
a0Var.a(a0Var.m());
a0Var.j = false;
}
this.S = 0;
for (k1 k1Var : this.i) {
try {
f(k1Var);
} catch (ExoPlaybackException | RuntimeException e2) {
p.b("ExoPlayerImplInternal", "Disable failed.", e2);
}
}
if (z2) {
for (k1 k1Var2 : this.i) {
try {
k1Var2.reset();
} catch (RuntimeException e3) {
p.b("ExoPlayerImplInternal", "Reset failed.", e3);
}
}
}
this.Q = 0;
c1 c1Var = this.E;
y.a aVar2 = c1Var.f773c;
long j3 = c1Var.f774s;
long j4 = g0(this.E, this.f943s, this.r) ? this.E.d : this.E.f774s;
if (z3) {
this.R = null;
Pair<y.a, Long> m = m(this.E.b);
aVar2 = (y.a) m.first;
j3 = ((Long) m.second).longValue();
j4 = -9223372036854775807L;
if (!aVar2.equals(this.E.f773c)) {
z6 = true;
aVar = aVar2;
j = j3;
j2 = -9223372036854775807L;
this.f946z.b();
this.K = false;
c1 c1Var2 = this.E;
r1 r1Var = c1Var2.b;
int i = c1Var2.e;
ExoPlaybackException exoPlaybackException = !z5 ? null : c1Var2.f;
TrackGroupArray trackGroupArray = !z6 ? TrackGroupArray.i : c1Var2.h;
m mVar = !z6 ? this.l : c1Var2.i;
if (!z6) {
c.i.b.b.a<Object> aVar3 = u.j;
list = c.i.b.b.q0.k;
} else {
list = c1Var2.j;
}
this.E = new c1(r1Var, aVar, j2, i, exoPlaybackException, false, trackGroupArray, mVar, list, aVar, c1Var2.l, c1Var2.m, c1Var2.n, j, 0, j, this.P, false);
if (z4) {
b1 b1Var = this.A;
for (b1.b bVar : b1Var.g.values()) {
try {
bVar.a.a(bVar.b);
} catch (RuntimeException e4) {
p.b("MediaSourceList", "Failed to release child source.", e4);
}
bVar.a.c(bVar.f762c);
}
b1Var.g.clear();
b1Var.h.clear();
b1Var.j = false;
}
this.V = null;
}
}
aVar = aVar2;
j = j3;
j2 = j4;
z6 = false;
this.f946z.b();
this.K = false;
c1 c1Var2 = this.E;
r1 r1Var = c1Var2.b;
int i = c1Var2.e;
if (!z5) {
}
if (!z6) {
}
if (!z6) {
}
if (!z6) {
}
this.E = new c1(r1Var, aVar, j2, i, exoPlaybackException, false, trackGroupArray, mVar, list, aVar, c1Var2.l, c1Var2.m, c1Var2.n, j, 0, j, this.P, false);
if (z4) {
}
this.V = null;
}
public final void G() {
x0 x0Var = this.f946z.h;
this.I = x0Var != null && x0Var.f.g && this.H;
}
public final void H(long j) throws ExoPlaybackException {
x0 x0Var = this.f946z.h;
if (x0Var != null) {
j += x0Var.o;
}
this.S = j;
this.v.i.a(j);
k1[] k1VarArr = this.i;
for (k1 k1Var : k1VarArr) {
if (w(k1Var)) {
k1Var.u(this.S);
}
}
for (x0 x0Var2 = this.f946z.h; x0Var2 != null; x0Var2 = x0Var2.l) {
c.i.a.c.f2.g[] gVarArr = x0Var2.n.f864c;
for (c.i.a.c.f2.g gVar : gVarArr) {
if (gVar != null) {
gVar.j();
}
}
}
}
public final void J(r1 r1Var, r1 r1Var2) {
if (!r1Var.q() || !r1Var2.q()) {
int size = this.w.size();
while (true) {
size--;
if (size < 0) {
Collections.sort(this.w);
return;
} else if (!I(this.w.get(size), r1Var, r1Var2, this.L, this.M, this.r, this.f943s)) {
this.w.get(size).i.c(false);
this.w.remove(size);
}
}
}
}
public final void M(long j, long j2) {
this.o.a.removeMessages(2);
this.o.a.sendEmptyMessageAtTime(2, j + j2);
}
public final void N(boolean z2) throws ExoPlaybackException {
y.a aVar = this.f946z.h.f.a;
long Q = Q(aVar, this.E.f774s, true, false);
if (Q != this.E.f774s) {
this.E = u(aVar, Q, this.E.d);
if (z2) {
this.F.b(4);
}
}
}
/* JADX WARNING: Removed duplicated region for block: B:70:0x0148 */
/* JADX WARNING: Removed duplicated region for block: B:79:0x0164 */
/* JADX WARNING: Removed duplicated region for block: B:84:? A[RETURN, SYNTHETIC] */
public final void O(g gVar) throws ExoPlaybackException {
long j;
long j2;
y.a aVar;
boolean z2;
int i;
long j3;
Throwable th;
long j4;
long j5;
long P;
boolean z3;
c1 c1Var;
int i2;
boolean z4 = true;
this.F.a(1);
Pair<Object, Long> K = K(this.E.b, gVar, true, this.L, this.M, this.r, this.f943s);
if (K == null) {
Pair<y.a, Long> m = m(this.E.b);
aVar = (y.a) m.first;
j2 = ((Long) m.second).longValue();
z2 = !this.E.b.q();
j = -9223372036854775807L;
} else {
Object obj = K.first;
j2 = ((Long) K.second).longValue();
j = gVar.f950c == -9223372036854775807L ? -9223372036854775807L : j2;
y.a n = this.f946z.n(this.E.b, obj, j2);
if (n.a()) {
this.E.b.h(n.a, this.f943s);
j2 = this.f943s.e(n.b) == n.f810c ? this.f943s.f.f : 0;
aVar = n;
z2 = true;
} else {
aVar = n;
z2 = gVar.f950c == -9223372036854775807L;
}
}
try {
if (this.E.b.q()) {
try {
this.R = gVar;
} catch (Throwable th2) {
th = th2;
j3 = j2;
i = 2;
this.E = u(aVar, j3, j);
if (z2) {
}
throw th;
}
} else if (K == null) {
if (this.E.e != 1) {
d0(4);
}
F(false, true, false, true);
} else {
if (aVar.equals(this.E.f773c)) {
x0 x0Var = this.f946z.h;
long i3 = (x0Var == null || !x0Var.d || j2 == 0) ? j2 : x0Var.a.i(j2, this.D);
if (h0.b(i3) == h0.b(this.E.f774s) && ((i2 = (c1Var = this.E).e) == 2 || i2 == 3)) {
this.E = u(aVar, c1Var.f774s, j);
if (z2) {
this.F.b(2);
return;
}
return;
}
i = 2;
j5 = i3;
} else {
i = 2;
j5 = j2;
}
try {
P = P(aVar, j5, this.E.e == 4);
if (j2 == P) {
z4 = false;
}
z3 = z4 | z2;
} catch (Throwable th3) {
th = th3;
j3 = j2;
this.E = u(aVar, j3, j);
if (z2) {
this.F.b(i);
}
throw th;
}
try {
c1 c1Var2 = this.E;
r1 r1Var = c1Var2.b;
l0(r1Var, aVar, r1Var, c1Var2.f773c, j);
z2 = z3;
j4 = P;
this.E = u(aVar, j4, j);
if (!z2) {
this.F.b(i);
return;
}
return;
} catch (Throwable th4) {
th = th4;
z2 = z3;
j3 = P;
this.E = u(aVar, j3, j);
if (z2) {
}
throw th;
}
}
j4 = j2;
i = 2;
this.E = u(aVar, j4, j);
if (!z2) {
}
} catch (Throwable th5) {
th = th5;
i = 2;
j3 = j2;
this.E = u(aVar, j3, j);
if (z2) {
}
throw th;
}
}
public final long P(y.a aVar, long j, boolean z2) throws ExoPlaybackException {
z0 z0Var = this.f946z;
return Q(aVar, j, z0Var.h != z0Var.i, z2);
}
public final long Q(y.a aVar, long j, boolean z2, boolean z3) throws ExoPlaybackException {
z0 z0Var;
j0();
this.J = false;
if (z3 || this.E.e == 3) {
d0(2);
}
x0 x0Var = this.f946z.h;
x0 x0Var2 = x0Var;
while (x0Var2 != null && !aVar.equals(x0Var2.f.a)) {
x0Var2 = x0Var2.l;
}
if (z2 || x0Var != x0Var2 || (x0Var2 != null && x0Var2.o + j < 0)) {
for (k1 k1Var : this.i) {
f(k1Var);
}
if (x0Var2 != null) {
while (true) {
z0Var = this.f946z;
if (z0Var.h == x0Var2) {
break;
}
z0Var.a();
}
z0Var.m(x0Var2);
x0Var2.o = 0;
h();
}
}
if (x0Var2 != null) {
this.f946z.m(x0Var2);
if (!x0Var2.d) {
x0Var2.f = x0Var2.f.b(j);
} else {
long j2 = x0Var2.f.e;
if (j2 != -9223372036854775807L && j >= j2) {
j = Math.max(0L, j2 - 1);
}
if (x0Var2.e) {
long f2 = x0Var2.a.f(j);
x0Var2.a.r(f2 - this.t, this.u);
j = f2;
}
}
H(j);
y();
} else {
this.f946z.b();
H(j);
}
q(false);
this.o.d(2);
return j;
}
public final void R(h1 h1Var) throws ExoPlaybackException {
if (h1Var.g == this.q) {
e(h1Var);
int i = this.E.e;
if (i == 3 || i == 2) {
this.o.d(2);
return;
}
return;
}
this.o.c(15, h1Var).sendToTarget();
}
public final void S(h1 h1Var) {
Looper looper = h1Var.g;
if (!looper.getThread().isAlive()) {
Log.w("TAG", "Trying to send message on a dead thread.");
h1Var.c(false);
return;
}
c0 b2 = this.f944x.b(looper, null);
b2.a.post(new x(this, h1Var));
}
public final void T(k1 k1Var, long j) {
k1Var.k();
if (k1Var instanceof c.i.a.c.e2.l) {
c.i.a.c.e2.l lVar = (c.i.a.c.e2.l) k1Var;
AnimatableValueParser.D(lVar.r);
lVar.H = j;
}
}
public final void U(boolean z2, @Nullable AtomicBoolean atomicBoolean) {
if (this.N != z2) {
this.N = z2;
if (!z2) {
k1[] k1VarArr = this.i;
for (k1 k1Var : k1VarArr) {
if (!w(k1Var)) {
k1Var.reset();
}
}
}
}
if (atomicBoolean != null) {
synchronized (this) {
atomicBoolean.set(true);
notifyAll();
}
}
}
public final void V(a aVar) throws ExoPlaybackException {
this.F.a(1);
if (aVar.f947c != -1) {
this.R = new g(new i1(aVar.a, aVar.b), aVar.f947c, aVar.d);
}
b1 b1Var = this.A;
List<b1.c> list = aVar.a;
h0 h0Var = aVar.b;
b1Var.i(0, b1Var.a.size());
r(b1Var.a(b1Var.a.size(), list, h0Var));
}
public final void W(boolean z2) {
if (z2 != this.P) {
this.P = z2;
c1 c1Var = this.E;
int i = c1Var.e;
if (z2 || i == 4 || i == 1) {
this.E = c1Var.c(z2);
} else {
this.o.d(2);
}
}
}
public final void X(boolean z2) throws ExoPlaybackException {
this.H = z2;
G();
if (this.I) {
z0 z0Var = this.f946z;
if (z0Var.i != z0Var.h) {
N(true);
q(false);
}
}
}
public final void Y(boolean z2, int i, boolean z3, int i2) throws ExoPlaybackException {
this.F.a(z3 ? 1 : 0);
d dVar = this.F;
dVar.a = true;
dVar.f = true;
dVar.g = i2;
this.E = this.E.d(z2, i);
this.J = false;
for (x0 x0Var = this.f946z.h; x0Var != null; x0Var = x0Var.l) {
c.i.a.c.f2.g[] gVarArr = x0Var.n.f864c;
for (c.i.a.c.f2.g gVar : gVarArr) {
if (gVar != null) {
gVar.c(z2);
}
}
}
if (!e0()) {
j0();
m0();
return;
}
int i3 = this.E.e;
if (i3 == 3) {
h0();
this.o.d(2);
} else if (i3 == 2) {
this.o.d(2);
}
}
public final void Z(d1 d1Var) throws ExoPlaybackException {
this.v.e(d1Var);
d1 c2 = this.v.c();
t(c2, c2.b, true, true);
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [c.i.a.c.d2.g0] */
@Override // c.i.a.c.d2.g0.a
public void a(v vVar) {
this.o.c(9, vVar).sendToTarget();
}
public final void a0(int i) throws ExoPlaybackException {
this.L = i;
z0 z0Var = this.f946z;
r1 r1Var = this.E.b;
z0Var.f = i;
if (!z0Var.p(r1Var)) {
N(true);
}
q(false);
}
@Override // c.i.a.c.d2.v.a
public void b(v vVar) {
this.o.c(8, vVar).sendToTarget();
}
public final void b0(boolean z2) throws ExoPlaybackException {
this.M = z2;
z0 z0Var = this.f946z;
r1 r1Var = this.E.b;
z0Var.g = z2;
if (!z0Var.p(r1Var)) {
N(true);
}
q(false);
}
public final void c(a aVar, int i) throws ExoPlaybackException {
this.F.a(1);
b1 b1Var = this.A;
if (i == -1) {
i = b1Var.e();
}
r(b1Var.a(i, aVar.a, aVar.b));
}
public final void c0(h0 h0Var) throws ExoPlaybackException {
this.F.a(1);
b1 b1Var = this.A;
int e2 = b1Var.e();
if (h0Var.b() != e2) {
h0Var = h0Var.h().f(0, e2);
}
b1Var.i = h0Var;
r(b1Var.c());
}
public final void d(ExoPlaybackException exoPlaybackException) throws ExoPlaybackException {
AnimatableValueParser.k(exoPlaybackException.isRecoverable && exoPlaybackException.type == 1);
try {
N(true);
} catch (Exception e2) {
exoPlaybackException.addSuppressed(e2);
throw exoPlaybackException;
}
}
public final void d0(int i) {
c1 c1Var = this.E;
if (c1Var.e != i) {
this.E = c1Var.g(i);
}
}
public final void e(h1 h1Var) throws ExoPlaybackException {
h1Var.b();
boolean z2 = true;
try {
h1Var.a.r(h1Var.e, h1Var.f);
} finally {
h1Var.c(z2);
}
}
public final boolean e0() {
c1 c1Var = this.E;
return c1Var.l && c1Var.m == 0;
}
public final void f(k1 k1Var) throws ExoPlaybackException {
if (k1Var.getState() != 0) {
m0 m0Var = this.v;
if (k1Var == m0Var.k) {
m0Var.l = null;
m0Var.k = null;
m0Var.m = true;
}
if (k1Var.getState() == 2) {
k1Var.stop();
}
k1Var.g();
this.Q--;
}
}
public final boolean f0(r1 r1Var, y.a aVar) {
if (aVar.a() || r1Var.q()) {
return false;
}
r1Var.n(r1Var.h(aVar.a, this.f943s).f952c, this.r);
if (!this.r.c()) {
return false;
}
r1.c cVar = this.r;
return cVar.k && cVar.h != -9223372036854775807L;
}
/* JADX WARNING: Code restructure failed: missing block: B:269:0x0468, code lost:
if (r46.m.f(n(), r46.v.c().b, r46.J, r31) == false) goto L_0x046b;
*/
/* JADX WARNING: Code restructure failed: missing block: B:27:0x0098, code lost:
if (r5 != -9223372036854775807L) goto L_0x009d;
*/
public final void g() throws ExoPlaybackException, IOException {
boolean z2;
boolean z3;
boolean z4;
boolean z5;
int i;
boolean z6;
x0 x0Var;
x0 x0Var2;
boolean z7;
long j;
long j2;
long a2 = this.f944x.a();
if (!this.E.b.q() && this.A.j) {
this.f946z.l(this.S);
z0 z0Var = this.f946z;
x0 x0Var3 = z0Var.j;
if (x0Var3 == null || (!x0Var3.f.h && x0Var3.f() && z0Var.j.f.e != -9223372036854775807L && z0Var.k < 100)) {
z0 z0Var2 = this.f946z;
long j3 = this.S;
c1 c1Var = this.E;
x0 x0Var4 = z0Var2.j;
y0 d2 = x0Var4 == null ? z0Var2.d(c1Var.b, c1Var.f773c, c1Var.d, c1Var.f774s) : z0Var2.c(c1Var.b, x0Var4, j3);
if (d2 != null) {
z0 z0Var3 = this.f946z;
l1[] l1VarArr = this.j;
l lVar = this.k;
c.i.a.c.h2.m h = this.m.h();
b1 b1Var = this.A;
m mVar = this.l;
x0 x0Var5 = z0Var3.j;
if (x0Var5 == null) {
if (d2.a.a()) {
j2 = d2.f1012c;
}
j2 = 0;
j = j2;
} else {
j = (x0Var5.o + x0Var5.f.e) - d2.b;
}
x0 x0Var6 = new x0(l1VarArr, j, lVar, h, b1Var, d2, mVar);
x0 x0Var7 = z0Var3.j;
if (x0Var7 == null) {
z0Var3.h = x0Var6;
z0Var3.i = x0Var6;
} else if (x0Var6 != x0Var7.l) {
x0Var7.b();
x0Var7.l = x0Var6;
x0Var7.c();
}
z0Var3.l = null;
z0Var3.j = x0Var6;
z0Var3.k++;
z0Var3.k();
x0Var6.a.l(this, d2.b);
if (this.f946z.h == x0Var6) {
H(x0Var6.e());
}
q(false);
}
}
if (this.K) {
this.K = v();
k0();
} else {
y();
}
x0 x0Var8 = this.f946z.i;
if (x0Var8 != null) {
if (x0Var8.l != null && !this.I) {
if (x0Var8.d) {
int i2 = 0;
while (true) {
k1[] k1VarArr = this.i;
if (i2 >= k1VarArr.length) {
z7 = true;
break;
}
k1 k1Var = k1VarArr[i2];
c.i.a.c.d2.f0 f0Var = x0Var8.f1007c[i2];
if (!(k1Var.h() == f0Var && (f0Var == null || k1Var.i()))) {
break;
}
i2++;
}
}
z7 = false;
if (z7) {
x0 x0Var9 = x0Var8.l;
if (x0Var9.d || this.S >= x0Var9.e()) {
m mVar2 = x0Var8.n;
z0 z0Var4 = this.f946z;
x0 x0Var10 = z0Var4.i;
AnimatableValueParser.D((x0Var10 == null || x0Var10.l == null) ? false : true);
z0Var4.i = z0Var4.i.l;
z0Var4.k();
x0 x0Var11 = z0Var4.i;
m mVar3 = x0Var11.n;
if (!x0Var11.d || x0Var11.a.k() == -9223372036854775807L) {
for (int i3 = 0; i3 < this.i.length; i3++) {
boolean b2 = mVar2.b(i3);
boolean b3 = mVar3.b(i3);
if (b2 && !this.i[i3].v()) {
boolean z8 = ((g0) this.j[i3]).i == 7;
m1 m1Var = mVar2.b[i3];
m1 m1Var2 = mVar3.b[i3];
if (!b3 || !m1Var2.equals(m1Var) || z8) {
T(this.i[i3], x0Var11.e());
}
}
}
} else {
long e2 = x0Var11.e();
k1[] k1VarArr2 = this.i;
for (k1 k1Var2 : k1VarArr2) {
if (k1Var2.h() != null) {
T(k1Var2, e2);
}
}
}
}
}
} else if (x0Var8.f.h || this.I) {
int i4 = 0;
while (true) {
k1[] k1VarArr3 = this.i;
if (i4 >= k1VarArr3.length) {
break;
}
k1 k1Var3 = k1VarArr3[i4];
c.i.a.c.d2.f0 f0Var2 = x0Var8.f1007c[i4];
if (f0Var2 != null && k1Var3.h() == f0Var2 && k1Var3.i()) {
long j4 = x0Var8.f.e;
T(k1Var3, (j4 == -9223372036854775807L || j4 == Long.MIN_VALUE) ? -9223372036854775807L : j4 + x0Var8.o);
}
i4++;
}
}
}
z0 z0Var5 = this.f946z;
x0 x0Var12 = z0Var5.i;
if (!(x0Var12 == null || z0Var5.h == x0Var12 || x0Var12.g)) {
m mVar4 = x0Var12.n;
boolean z9 = false;
int i5 = 0;
while (true) {
k1[] k1VarArr4 = this.i;
if (i5 >= k1VarArr4.length) {
break;
}
k1 k1Var4 = k1VarArr4[i5];
if (w(k1Var4)) {
boolean z10 = k1Var4.h() != x0Var12.f1007c[i5];
if (!mVar4.b(i5) || z10) {
if (!k1Var4.v()) {
k1Var4.j(j(mVar4.f864c[i5]), x0Var12.f1007c[i5], x0Var12.e(), x0Var12.o);
} else if (k1Var4.b()) {
f(k1Var4);
} else {
z9 = true;
}
}
}
i5++;
}
if (!z9) {
h();
}
}
boolean z11 = false;
while (true) {
if (!(e0() && !this.I && (x0Var = this.f946z.h) != null && (x0Var2 = x0Var.l) != null && this.S >= x0Var2.e() && x0Var2.g)) {
break;
}
if (z11) {
z();
}
z0 z0Var6 = this.f946z;
x0 x0Var13 = z0Var6.h;
x0 a3 = z0Var6.a();
y0 y0Var = a3.f;
this.E = u(y0Var.a, y0Var.b, y0Var.f1012c);
this.F.b(x0Var13.f.f ? 0 : 3);
r1 r1Var = this.E.b;
l0(r1Var, a3.f.a, r1Var, x0Var13.f.a, -9223372036854775807L);
G();
m0();
z11 = true;
}
}
int i6 = this.E.e;
if (i6 == 1 || i6 == 4) {
this.o.a.removeMessages(2);
return;
}
x0 x0Var14 = this.f946z.h;
if (x0Var14 == null) {
M(a2, 10);
return;
}
AnimatableValueParser.g("doSomeWork");
m0();
if (x0Var14.d) {
long elapsedRealtime = SystemClock.elapsedRealtime() * 1000;
x0Var14.a.r(this.E.f774s - this.t, this.u);
boolean z12 = true;
z2 = true;
int i7 = 0;
while (true) {
k1[] k1VarArr5 = this.i;
if (i7 >= k1VarArr5.length) {
break;
}
k1 k1Var5 = k1VarArr5[i7];
if (w(k1Var5)) {
k1Var5.q(this.S, elapsedRealtime);
boolean z13 = z12 && k1Var5.b();
boolean z14 = x0Var14.f1007c[i7] != k1Var5.h();
boolean z15 = z14 || (!z14 && k1Var5.i()) || k1Var5.d() || k1Var5.b();
boolean z16 = z2 && z15;
if (!z15) {
k1Var5.s();
}
z2 = z16;
z12 = z13;
}
i7++;
}
z3 = z12;
} else {
x0Var14.a.e();
z3 = true;
z2 = true;
}
long j5 = x0Var14.f.e;
boolean z17 = z3 && x0Var14.d && (j5 == -9223372036854775807L || j5 <= this.E.f774s);
if (z17 && this.I) {
this.I = false;
Y(false, this.E.m, false, 5);
}
if (!z17 || !x0Var14.f.h) {
c1 c1Var2 = this.E;
if (c1Var2.e == 2) {
if (this.Q == 0) {
z6 = x();
} else {
if (z2) {
if (c1Var2.g) {
long j6 = f0(c1Var2.b, this.f946z.h.f.a) ? ((k0) this.B).i : -9223372036854775807L;
x0 x0Var15 = this.f946z.j;
boolean z18 = x0Var15.f() && x0Var15.f.h;
boolean z19 = x0Var15.f.a.a() && !x0Var15.d;
if (!z18) {
if (!z19) {
}
}
}
z6 = true;
}
z6 = false;
}
if (z6) {
d0(3);
this.V = null;
if (e0()) {
h0();
}
}
}
if (this.E.e == 3 && (this.Q != 0 ? !z2 : !x())) {
this.J = e0();
d0(2);
if (this.J) {
for (x0 x0Var16 = this.f946z.h; x0Var16 != null; x0Var16 = x0Var16.l) {
c.i.a.c.f2.g[] gVarArr = x0Var16.n.f864c;
for (c.i.a.c.f2.g gVar : gVarArr) {
if (gVar != null) {
gVar.k();
}
}
}
k0 k0Var = (k0) this.B;
long j7 = k0Var.i;
if (j7 != -9223372036854775807L) {
long j8 = j7 + k0Var.b;
k0Var.i = j8;
long j9 = k0Var.h;
if (j9 != -9223372036854775807L && j8 > j9) {
k0Var.i = j9;
}
k0Var.m = -9223372036854775807L;
}
}
j0();
}
} else {
d0(4);
j0();
}
if (this.E.e == 2) {
int i8 = 0;
while (true) {
k1[] k1VarArr6 = this.i;
if (i8 >= k1VarArr6.length) {
break;
}
if (w(k1VarArr6[i8]) && this.i[i8].h() == x0Var14.f1007c[i8]) {
this.i[i8].s();
}
i8++;
}
c1 c1Var3 = this.E;
if (!c1Var3.g && c1Var3.r < 500000 && v()) {
throw new IllegalStateException("Playback stuck buffering and not loading");
}
}
boolean z20 = this.P;
c1 c1Var4 = this.E;
if (z20 != c1Var4.o) {
this.E = c1Var4.c(z20);
}
if ((!e0() || this.E.e != 3) && (i = this.E.e) != 2) {
if (this.Q == 0 || i == 4) {
this.o.a.removeMessages(2);
} else {
M(a2, 1000);
}
z4 = false;
} else {
if (!this.P || !this.O) {
M(a2, 10);
z5 = true;
} else {
z5 = false;
}
z4 = true ^ z5;
}
c1 c1Var5 = this.E;
if (c1Var5.p != z4) {
this.E = new c1(c1Var5.b, c1Var5.f773c, c1Var5.d, c1Var5.e, c1Var5.f, c1Var5.g, c1Var5.h, c1Var5.i, c1Var5.j, c1Var5.k, c1Var5.l, c1Var5.m, c1Var5.n, c1Var5.q, c1Var5.r, c1Var5.f774s, c1Var5.o, z4);
}
this.O = false;
AnimatableValueParser.f0();
}
public final void h() throws ExoPlaybackException {
i(new boolean[this.i.length]);
}
public final void h0() throws ExoPlaybackException {
this.J = false;
m0 m0Var = this.v;
m0Var.n = true;
m0Var.i.b();
k1[] k1VarArr = this.i;
for (k1 k1Var : k1VarArr) {
if (w(k1Var)) {
k1Var.start();
}
}
}
@Override // android.os.Handler.Callback
public boolean handleMessage(Message message) {
x0 x0Var;
try {
switch (message.what) {
case 0:
B();
break;
case 1:
Y(message.arg1 != 0, message.arg2, true, 1);
break;
case 2:
g();
break;
case 3:
O((g) message.obj);
break;
case 4:
Z((d1) message.obj);
break;
case 5:
this.D = (o1) message.obj;
break;
case 6:
i0(false, true);
break;
case 7:
C();
return true;
case 8:
s((v) message.obj);
break;
case 9:
p((v) message.obj);
break;
case 10:
E();
break;
case 11:
a0(message.arg1);
break;
case 12:
b0(message.arg1 != 0);
break;
case 13:
U(message.arg1 != 0, (AtomicBoolean) message.obj);
break;
case 14:
h1 h1Var = (h1) message.obj;
Objects.requireNonNull(h1Var);
R(h1Var);
break;
case 15:
S((h1) message.obj);
break;
case 16:
d1 d1Var = (d1) message.obj;
t(d1Var, d1Var.b, true, false);
break;
case 17:
V((a) message.obj);
break;
case 18:
c((a) message.obj, message.arg1);
break;
case 19:
A((b) message.obj);
break;
case 20:
D(message.arg1, message.arg2, (h0) message.obj);
break;
case 21:
c0((h0) message.obj);
break;
case 22:
r(this.A.c());
break;
case 23:
X(message.arg1 != 0);
break;
case 24:
W(message.arg1 == 1);
break;
case 25:
d((ExoPlaybackException) message.obj);
break;
default:
return false;
}
z();
} catch (ExoPlaybackException e2) {
e = e2;
if (e.type == 1 && (x0Var = this.f946z.i) != null) {
e = e.a(x0Var.f.a);
}
if (!e.isRecoverable || this.V != null) {
ExoPlaybackException exoPlaybackException = this.V;
if (exoPlaybackException != null) {
e.addSuppressed(exoPlaybackException);
this.V = null;
}
p.b("ExoPlayerImplInternal", "Playback error", e);
i0(true, false);
this.E = this.E.e(e);
} else {
p.c("ExoPlayerImplInternal", "Recoverable playback error", e);
this.V = e;
Message c2 = this.o.c(25, e);
c2.getTarget().sendMessageAtFrontOfQueue(c2);
}
z();
} catch (IOException e3) {
ExoPlaybackException exoPlaybackException2 = new ExoPlaybackException(0, e3);
x0 x0Var2 = this.f946z.h;
if (x0Var2 != null) {
exoPlaybackException2 = exoPlaybackException2.a(x0Var2.f.a);
}
p.b("ExoPlayerImplInternal", "Playback error", exoPlaybackException2);
i0(false, false);
this.E = this.E.e(exoPlaybackException2);
z();
} catch (RuntimeException e4) {
ExoPlaybackException exoPlaybackException3 = new ExoPlaybackException(2, e4);
p.b("ExoPlayerImplInternal", "Playback error", exoPlaybackException3);
i0(true, false);
this.E = this.E.e(exoPlaybackException3);
z();
}
return true;
}
public final void i(boolean[] zArr) throws ExoPlaybackException {
r rVar;
x0 x0Var = this.f946z.i;
m mVar = x0Var.n;
for (int i = 0; i < this.i.length; i++) {
if (!mVar.b(i)) {
this.i[i].reset();
}
}
for (int i2 = 0; i2 < this.i.length; i2++) {
if (mVar.b(i2)) {
boolean z2 = zArr[i2];
k1 k1Var = this.i[i2];
if (!w(k1Var)) {
z0 z0Var = this.f946z;
x0 x0Var2 = z0Var.i;
boolean z3 = x0Var2 == z0Var.h;
m mVar2 = x0Var2.n;
m1 m1Var = mVar2.b[i2];
Format[] j = j(mVar2.f864c[i2]);
boolean z4 = e0() && this.E.e == 3;
boolean z5 = !z2 && z4;
this.Q++;
k1Var.o(m1Var, j, x0Var2.f1007c[i2], this.S, z5, z3, x0Var2.e(), x0Var2.o);
k1Var.r(103, new p0(this));
m0 m0Var = this.v;
Objects.requireNonNull(m0Var);
r w = k1Var.w();
if (!(w == null || w == (rVar = m0Var.l))) {
if (rVar == null) {
m0Var.l = w;
m0Var.k = k1Var;
w.e(m0Var.i.m);
} else {
throw new ExoPlaybackException(2, new IllegalStateException("Multiple renderer media clocks enabled."));
}
}
if (z4) {
k1Var.start();
}
} else {
continue;
}
}
}
x0Var.g = true;
}
public final void i0(boolean z2, boolean z3) {
F(z2 || !this.N, false, true, false);
this.F.a(z3 ? 1 : 0);
this.m.i();
d0(1);
}
public final void j0() throws ExoPlaybackException {
m0 m0Var = this.v;
m0Var.n = false;
a0 a0Var = m0Var.i;
if (a0Var.j) {
a0Var.a(a0Var.m());
a0Var.j = false;
}
k1[] k1VarArr = this.i;
for (k1 k1Var : k1VarArr) {
if (w(k1Var) && k1Var.getState() == 2) {
k1Var.stop();
}
}
}
public final long k(r1 r1Var, Object obj, long j) {
r1Var.n(r1Var.h(obj, this.f943s).f952c, this.r);
r1.c cVar = this.r;
if (cVar.h != -9223372036854775807L && cVar.c()) {
r1.c cVar2 = this.r;
if (cVar2.k) {
long j2 = cVar2.i;
int i = f0.a;
return h0.a((j2 == -9223372036854775807L ? System.currentTimeMillis() : j2 + SystemClock.elapsedRealtime()) - this.r.h) - (j + this.f943s.e);
}
}
return -9223372036854775807L;
}
public final void k0() {
x0 x0Var = this.f946z.j;
boolean z2 = this.K || (x0Var != null && x0Var.a.h());
c1 c1Var = this.E;
if (z2 != c1Var.g) {
this.E = new c1(c1Var.b, c1Var.f773c, c1Var.d, c1Var.e, c1Var.f, z2, c1Var.h, c1Var.i, c1Var.j, c1Var.k, c1Var.l, c1Var.m, c1Var.n, c1Var.q, c1Var.r, c1Var.f774s, c1Var.o, c1Var.p);
}
}
public final long l() {
x0 x0Var = this.f946z.i;
if (x0Var == null) {
return 0;
}
long j = x0Var.o;
if (!x0Var.d) {
return j;
}
int i = 0;
while (true) {
k1[] k1VarArr = this.i;
if (i >= k1VarArr.length) {
return j;
}
if (w(k1VarArr[i]) && this.i[i].h() == x0Var.f1007c[i]) {
long t = this.i[i].t();
if (t == Long.MIN_VALUE) {
return Long.MIN_VALUE;
}
j = Math.max(t, j);
}
i++;
}
}
public final void l0(r1 r1Var, y.a aVar, r1 r1Var2, y.a aVar2, long j) {
if (r1Var.q() || !f0(r1Var, aVar)) {
float f2 = this.v.c().b;
d1 d1Var = this.E.n;
if (f2 != d1Var.b) {
this.v.e(d1Var);
return;
}
return;
}
r1Var.n(r1Var.h(aVar.a, this.f943s).f952c, this.r);
t0 t0Var = this.B;
v0.f fVar = this.r.m;
int i = f0.a;
k0 k0Var = (k0) t0Var;
Objects.requireNonNull(k0Var);
k0Var.d = h0.a(fVar.a);
k0Var.g = h0.a(fVar.b);
k0Var.h = h0.a(fVar.f985c);
float f3 = fVar.d;
if (f3 == -3.4028235E38f) {
f3 = 0.97f;
}
k0Var.k = f3;
float f4 = fVar.e;
if (f4 == -3.4028235E38f) {
f4 = 1.03f;
}
k0Var.j = f4;
k0Var.a();
if (j != -9223372036854775807L) {
k0 k0Var2 = (k0) this.B;
k0Var2.e = k(r1Var, aVar.a, j);
k0Var2.a();
return;
}
Object obj = this.r.f953c;
Object obj2 = null;
if (!r1Var2.q()) {
obj2 = r1Var2.n(r1Var2.h(aVar2.a, this.f943s).f952c, this.r).f953c;
}
if (!f0.a(obj2, obj)) {
k0 k0Var3 = (k0) this.B;
k0Var3.e = -9223372036854775807L;
k0Var3.a();
}
}
public final Pair<y.a, Long> m(r1 r1Var) {
long j = 0;
if (r1Var.q()) {
y.a aVar = c1.a;
return Pair.create(c1.a, 0L);
}
Pair<Object, Long> j2 = r1Var.j(this.r, this.f943s, r1Var.a(this.M), -9223372036854775807L);
y.a n = this.f946z.n(r1Var, j2.first, 0);
long longValue = ((Long) j2.second).longValue();
if (n.a()) {
r1Var.h(n.a, this.f943s);
if (n.f810c == this.f943s.e(n.b)) {
j = this.f943s.f.f;
}
longValue = j;
}
return Pair.create(n, Long.valueOf(longValue));
}
/* JADX INFO: finally extract failed */
/* JADX WARNING: Removed duplicated region for block: B:149:0x016b A[EDGE_INSN: B:149:0x016b->B:70:0x016b ?: BREAK , SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:154:0x01a5 A[SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:162:0x01dd A[SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:165:0x01d3 A[SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:61:0x0146 */
/* JADX WARNING: Removed duplicated region for block: B:72:0x0173 */
/* JADX WARNING: Removed duplicated region for block: B:87:0x01aa */
public final void m0() throws ExoPlaybackException {
q0 q0Var;
q0 q0Var2;
q0 q0Var3;
q0 q0Var4;
long j;
c cVar;
long j2;
c cVar2;
long j3;
q0 q0Var5;
q0 q0Var6;
q0 q0Var7;
x0 x0Var = this.f946z.h;
if (x0Var != null) {
long k = x0Var.d ? x0Var.a.k() : -9223372036854775807L;
if (k != -9223372036854775807L) {
H(k);
if (k != this.E.f774s) {
c1 c1Var = this.E;
this.E = u(c1Var.f773c, k, c1Var.d);
this.F.b(4);
}
q0Var2 = this;
q0Var = q0Var2;
} else {
m0 m0Var = this.v;
boolean z2 = x0Var != this.f946z.i;
k1 k1Var = m0Var.k;
if (k1Var == null || k1Var.b() || (!m0Var.k.d() && (z2 || m0Var.k.i()))) {
m0Var.m = true;
if (m0Var.n) {
m0Var.i.b();
}
} else {
r rVar = m0Var.l;
Objects.requireNonNull(rVar);
long m = rVar.m();
if (m0Var.m) {
if (m < m0Var.i.m()) {
a0 a0Var = m0Var.i;
if (a0Var.j) {
a0Var.a(a0Var.m());
a0Var.j = false;
}
} else {
m0Var.m = false;
if (m0Var.n) {
m0Var.i.b();
}
}
}
m0Var.i.a(m);
d1 c2 = rVar.c();
if (!c2.equals(m0Var.i.m)) {
a0 a0Var2 = m0Var.i;
if (a0Var2.j) {
a0Var2.a(a0Var2.m());
}
a0Var2.m = c2;
((q0) m0Var.j).o.c(16, c2).sendToTarget();
}
}
long m2 = m0Var.m();
this.S = m2;
long j4 = m2 - x0Var.o;
long j5 = this.E.f774s;
if (this.w.isEmpty() || this.E.f773c.a()) {
q0Var2 = this;
q0Var = q0Var2;
} else {
if (this.U) {
j5--;
this.U = false;
}
c1 c1Var2 = this.E;
int b2 = c1Var2.b.b(c1Var2.f773c.a);
int min = Math.min(this.T, this.w.size());
if (min > 0) {
cVar = this.w.get(min - 1);
j = j5;
q0Var4 = this;
q0Var = q0Var4;
q0Var3 = q0Var;
j2 = j4;
while (true) {
if (cVar != null) {
break;
}
int i = cVar.j;
if (i <= b2 && (i != b2 || cVar.k <= j)) {
break;
}
min--;
if (min <= 0) {
j3 = j;
q0Var5 = q0Var4;
q0Var6 = q0Var;
q0Var7 = q0Var3;
break;
}
cVar = q0Var4.w.get(min - 1);
}
if (min < q0Var4.w.size()) {
cVar2 = q0Var4.w.get(min);
while (true) {
if (cVar2 == null || cVar2.l == null) {
break;
}
int i2 = cVar2.j;
if (i2 >= b2 && (i2 != b2 || cVar2.k > j)) {
break;
}
min++;
if (min >= q0Var4.w.size()) {
break;
}
cVar2 = q0Var4.w.get(min);
}
while (cVar2 != null && cVar2.l != null && cVar2.j == b2) {
long j6 = cVar2.k;
if (j6 <= j || j6 > j4) {
break;
}
try {
q0Var4.R(cVar2.i);
Objects.requireNonNull(cVar2.i);
q0Var4.w.remove(min);
cVar2 = min >= q0Var4.w.size() ? q0Var4.w.get(min) : null;
} catch (Throwable th) {
Objects.requireNonNull(cVar2.i);
q0Var4.w.remove(min);
throw th;
}
}
q0Var4.T = min;
j4 = j2;
q0Var2 = q0Var3;
}
cVar2 = null;
while (true) {
int i2 = cVar2.j;
min++;
if (min >= q0Var4.w.size()) {
}
cVar2 = q0Var4.w.get(min);
}
while (cVar2 != null) {
long j6 = cVar2.k;
q0Var4.R(cVar2.i);
Objects.requireNonNull(cVar2.i);
q0Var4.w.remove(min);
if (min >= q0Var4.w.size()) {
}
}
q0Var4.T = min;
j4 = j2;
q0Var2 = q0Var3;
} else {
j3 = j5;
q0Var5 = this;
q0Var6 = q0Var5;
q0Var7 = q0Var6;
j2 = j4;
}
q0Var3 = q0Var7;
q0Var = q0Var6;
q0Var4 = q0Var5;
j = j3;
cVar = null;
while (true) {
if (cVar != null) {
}
cVar = q0Var4.w.get(min - 1);
}
if (min < q0Var4.w.size()) {
}
cVar2 = null;
while (true) {
int i2 = cVar2.j;
min++;
if (min >= q0Var4.w.size()) {
}
cVar2 = q0Var4.w.get(min);
}
while (cVar2 != null) {
}
q0Var4.T = min;
j4 = j2;
q0Var2 = q0Var3;
}
q0Var2.E.f774s = j4;
}
q0Var2.E.q = q0Var2.f946z.j.d();
q0Var2.E.r = q0Var.n();
c1 c1Var3 = q0Var2.E;
if (c1Var3.l && c1Var3.e == 3 && q0Var2.f0(c1Var3.b, c1Var3.f773c)) {
c1 c1Var4 = q0Var2.E;
float f2 = 1.0f;
if (c1Var4.n.b == 1.0f) {
t0 t0Var = q0Var2.B;
long k2 = q0Var2.k(c1Var4.b, c1Var4.f773c.a, c1Var4.f774s);
long n = q0Var.n();
k0 k0Var = (k0) t0Var;
if (k0Var.d != -9223372036854775807L) {
long j7 = k2 - n;
long j8 = k0Var.n;
if (j8 == -9223372036854775807L) {
k0Var.n = j7;
k0Var.o = 0;
} else {
float f3 = k0Var.f929c;
long max = Math.max(j7, (long) (((1.0f - f3) * ((float) j7)) + (((float) j8) * f3)));
k0Var.n = max;
long abs = Math.abs(j7 - max);
long j9 = k0Var.o;
float f4 = k0Var.f929c;
k0Var.o = (long) (((1.0f - f4) * ((float) abs)) + (((float) j9) * f4));
}
if (k0Var.m == -9223372036854775807L || SystemClock.elapsedRealtime() - k0Var.m >= 1000) {
k0Var.m = SystemClock.elapsedRealtime();
long j10 = (k0Var.o * 3) + k0Var.n;
if (k0Var.i > j10) {
float a2 = (float) h0.a(1000);
long[] jArr = {j10, k0Var.f, k0Var.i - (((long) ((k0Var.l - 1.0f) * a2)) + ((long) ((k0Var.j - 1.0f) * a2)))};
c.i.a.f.e.o.c.h(true);
long j11 = jArr[0];
for (int i3 = 1; i3 < 3; i3++) {
if (jArr[i3] > j11) {
j11 = jArr[i3];
}
}
k0Var.i = j11;
} else {
long i4 = f0.i(k2 - ((long) (Math.max(0.0f, k0Var.l - 1.0f) / 1.0E-7f)), k0Var.i, j10);
k0Var.i = i4;
long j12 = k0Var.h;
if (j12 != -9223372036854775807L && i4 > j12) {
k0Var.i = j12;
}
}
long j13 = k2 - k0Var.i;
if (Math.abs(j13) < k0Var.a) {
k0Var.l = 1.0f;
} else {
k0Var.l = f0.g((1.0E-7f * ((float) j13)) + 1.0f, k0Var.k, k0Var.j);
}
f2 = k0Var.l;
} else {
f2 = k0Var.l;
}
}
if (q0Var2.v.c().b != f2) {
q0Var2.v.e(new d1(f2, q0Var2.E.n.f782c));
q0Var2.t(q0Var2.E.n, q0Var2.v.c().b, false, false);
}
}
}
}
}
public final long n() {
return o(this.E.q);
}
public final long o(long j) {
x0 x0Var = this.f946z.j;
if (x0Var == null) {
return 0;
}
return Math.max(0L, j - (this.S - x0Var.o));
}
public final void p(v vVar) {
z0 z0Var = this.f946z;
x0 x0Var = z0Var.j;
if (x0Var != null && x0Var.a == vVar) {
z0Var.l(this.S);
y();
}
}
public final void q(boolean z2) {
x0 x0Var = this.f946z.j;
y.a aVar = x0Var == null ? this.E.f773c : x0Var.f.a;
boolean z3 = !this.E.k.equals(aVar);
if (z3) {
this.E = this.E.a(aVar);
}
c1 c1Var = this.E;
c1Var.q = x0Var == null ? c1Var.f774s : x0Var.d();
this.E.r = n();
if ((z3 || z2) && x0Var != null && x0Var.d) {
this.m.d(this.i, x0Var.m, x0Var.n.f864c);
}
}
/* JADX WARNING: Removed duplicated region for block: B:130:0x0285 */
/* JADX WARNING: Removed duplicated region for block: B:131:0x0287 */
/* JADX WARNING: Removed duplicated region for block: B:139:0x02bf */
/* JADX WARNING: Removed duplicated region for block: B:45:0x0129 */
/* JADX WARNING: Removed duplicated region for block: B:46:0x0145 */
/* JADX WARNING: Removed duplicated region for block: B:49:0x0151 */
/* JADX WARNING: Removed duplicated region for block: B:57:0x0165 */
/* JADX WARNING: Removed duplicated region for block: B:65:0x0178 */
/* JADX WARNING: Removed duplicated region for block: B:68:0x017f */
/* JADX WARNING: Removed duplicated region for block: B:76:0x01a1 */
public final void r(r1 r1Var) throws ExoPlaybackException {
boolean z2;
boolean z3;
boolean z4;
int i;
y.a aVar;
int i2;
Object obj;
long j;
long j2;
y.a n;
long j3;
f fVar;
long j4;
int i3;
y.a aVar2;
boolean z5;
boolean z6;
boolean z7;
int i4;
boolean z8;
int i5;
Object obj2;
int i6;
boolean z9;
boolean z10;
boolean z11;
long j5;
g gVar;
boolean z12;
Throwable th;
c1 c1Var = this.E;
g gVar2 = this.R;
z0 z0Var = this.f946z;
int i7 = this.L;
boolean z13 = this.M;
r1.c cVar = this.r;
r1.b bVar = this.f943s;
if (r1Var.q()) {
y.a aVar3 = c1.a;
fVar = new f(c1.a, 0, -9223372036854775807L, false, true, false);
} else {
y.a aVar4 = c1Var.f773c;
Object obj3 = aVar4.a;
boolean g02 = g0(c1Var, bVar, cVar);
long j6 = g02 ? c1Var.d : c1Var.f774s;
if (gVar2 != null) {
aVar2 = aVar4;
Pair<Object, Long> K = K(r1Var, gVar2, true, i7, z13, cVar, bVar);
if (K == null) {
i4 = r1Var.a(z13);
obj = obj3;
z10 = false;
z9 = false;
z5 = true;
} else {
if (gVar2.f950c == -9223372036854775807L) {
i4 = r1Var.h(K.first, bVar).f952c;
obj = obj3;
z11 = false;
} else {
obj = K.first;
j6 = ((Long) K.second).longValue();
i4 = -1;
z11 = true;
}
z10 = c1Var.e == 4;
z9 = z11;
z5 = false;
}
i = -1;
z6 = z10;
z7 = z9;
} else {
aVar2 = aVar4;
if (c1Var.b.q()) {
i6 = r1Var.a(z13);
obj2 = obj3;
i = -1;
} else {
obj2 = obj3;
if (r1Var.b(obj2) == -1) {
i = -1;
Object L = L(cVar, bVar, i7, z13, obj2, c1Var.b, r1Var);
if (L == null) {
i4 = r1Var.a(z13);
z5 = true;
} else {
i4 = r1Var.h(L, bVar).f952c;
z5 = false;
}
obj = obj2;
z7 = false;
z6 = false;
} else {
i = -1;
if (!g02) {
aVar = aVar2;
i5 = -1;
obj = obj2;
z8 = false;
i2 = i5;
z2 = z8;
z4 = false;
z3 = false;
if (i2 == i) {
}
n = z0Var.n(r1Var, obj, j2);
if (!aVar.a.equals(obj) && !aVar.a() && !n.a() && (n.e != i || ((i3 = aVar.e) != i && n.b >= i3))) {
}
if (!n.a()) {
}
fVar = new f(n, j3, j, z4, z3, z2);
} else if (j6 == -9223372036854775807L) {
i6 = r1Var.h(obj2, bVar).f952c;
} else {
aVar = aVar2;
c1Var.b.h(aVar.a, bVar);
Pair<Object, Long> j7 = r1Var.j(cVar, bVar, r1Var.h(obj2, bVar).f952c, j6 + bVar.e);
obj = j7.first;
j6 = ((Long) j7.second).longValue();
i5 = -1;
z8 = true;
i2 = i5;
z2 = z8;
z4 = false;
z3 = false;
if (i2 == i) {
Pair<Object, Long> j8 = r1Var.j(cVar, bVar, i2, -9223372036854775807L);
obj = j8.first;
j = -9223372036854775807L;
j2 = ((Long) j8.second).longValue();
} else {
j2 = j6;
j = j2;
}
n = z0Var.n(r1Var, obj, j2);
if (!aVar.a.equals(obj) && !aVar.a() && !n.a() && (n.e != i || ((i3 = aVar.e) != i && n.b >= i3))) {
n = aVar;
}
if (!n.a()) {
if (n.equals(aVar)) {
j4 = c1Var.f774s;
} else {
r1Var.h(n.a, bVar);
j4 = n.f810c == bVar.e(n.b) ? bVar.f.f : 0;
}
j3 = j4;
} else {
j3 = j2;
}
fVar = new f(n, j3, j, z4, z3, z2);
}
}
}
i5 = i6;
aVar = aVar2;
obj = obj2;
z8 = false;
i2 = i5;
z2 = z8;
z4 = false;
z3 = false;
if (i2 == i) {
}
n = z0Var.n(r1Var, obj, j2);
if (!aVar.a.equals(obj) && !aVar.a() && !n.a() && (n.e != i || ((i3 = aVar.e) != i && n.b >= i3))) {
}
if (!n.a()) {
}
fVar = new f(n, j3, j, z4, z3, z2);
}
i2 = i4;
z2 = z7;
z4 = z6;
z3 = z5;
aVar = aVar2;
if (i2 == i) {
}
n = z0Var.n(r1Var, obj, j2);
if (!aVar.a.equals(obj) && !aVar.a() && !n.a() && (n.e != i || ((i3 = aVar.e) != i && n.b >= i3))) {
}
if (!n.a()) {
}
fVar = new f(n, j3, j, z4, z3, z2);
}
y.a aVar5 = fVar.a;
long j9 = fVar.f949c;
boolean z14 = fVar.d;
long j10 = fVar.b;
boolean z15 = !this.E.f773c.equals(aVar5) || j10 != this.E.f774s;
try {
if (fVar.e) {
if (this.E.e != 1) {
d0(4);
}
F(false, false, false, true);
}
if (!z15) {
j5 = j9;
z12 = false;
try {
if (!this.f946z.q(r1Var, this.S, l())) {
N(false);
}
} catch (Throwable th2) {
th = th2;
gVar = null;
c1 c1Var2 = this.E;
l0(r1Var, aVar5, c1Var2.b, c1Var2.f773c, !fVar.f ? j10 : -9223372036854775807L);
if (z15 || j5 != this.E.d) {
this.E = u(aVar5, j10, j5);
}
G();
J(r1Var, this.E.b);
this.E = this.E.h(r1Var);
if (!r1Var.q()) {
this.R = gVar;
}
q(z12);
throw th;
}
} else {
j5 = j9;
z12 = false;
if (!r1Var.q()) {
for (x0 x0Var = this.f946z.h; x0Var != null; x0Var = x0Var.l) {
if (x0Var.f.a.equals(aVar5)) {
x0Var.f = this.f946z.g(r1Var, x0Var.f);
}
}
j10 = P(aVar5, j10, z14);
}
}
c1 c1Var3 = this.E;
l0(r1Var, aVar5, c1Var3.b, c1Var3.f773c, fVar.f ? j10 : -9223372036854775807L);
if (z15 || j5 != this.E.d) {
this.E = u(aVar5, j10, j5);
}
G();
J(r1Var, this.E.b);
this.E = this.E.h(r1Var);
if (!r1Var.q()) {
this.R = null;
}
q(z12);
} catch (Throwable th3) {
th = th3;
j5 = j9;
z12 = false;
gVar = null;
c1 c1Var2 = this.E;
l0(r1Var, aVar5, c1Var2.b, c1Var2.f773c, !fVar.f ? j10 : -9223372036854775807L);
this.E = u(aVar5, j10, j5);
G();
J(r1Var, this.E.b);
this.E = this.E.h(r1Var);
if (!r1Var.q()) {
}
q(z12);
throw th;
}
}
public final void s(v vVar) throws ExoPlaybackException {
x0 x0Var = this.f946z.j;
if (x0Var != null && x0Var.a == vVar) {
float f2 = this.v.c().b;
r1 r1Var = this.E.b;
x0Var.d = true;
x0Var.m = x0Var.a.n();
m i = x0Var.i(f2, r1Var);
y0 y0Var = x0Var.f;
long j = y0Var.b;
long j2 = y0Var.e;
if (j2 != -9223372036854775807L && j >= j2) {
j = Math.max(0L, j2 - 1);
}
long a2 = x0Var.a(i, j, false, new boolean[x0Var.i.length]);
long j3 = x0Var.o;
y0 y0Var2 = x0Var.f;
x0Var.o = (y0Var2.b - a2) + j3;
x0Var.f = y0Var2.b(a2);
this.m.d(this.i, x0Var.m, x0Var.n.f864c);
if (x0Var == this.f946z.h) {
H(x0Var.f.b);
h();
c1 c1Var = this.E;
this.E = u(c1Var.f773c, x0Var.f.b, c1Var.d);
}
y();
}
}
public final void t(d1 d1Var, float f2, boolean z2, boolean z3) throws ExoPlaybackException {
int i;
if (z2) {
if (z3) {
this.F.a(1);
}
this.E = this.E.f(d1Var);
}
float f3 = d1Var.b;
x0 x0Var = this.f946z.h;
while (true) {
i = 0;
if (x0Var == null) {
break;
}
c.i.a.c.f2.g[] gVarArr = x0Var.n.f864c;
int length = gVarArr.length;
while (i < length) {
c.i.a.c.f2.g gVar = gVarArr[i];
if (gVar != null) {
gVar.i(f3);
}
i++;
}
x0Var = x0Var.l;
}
k1[] k1VarArr = this.i;
int length2 = k1VarArr.length;
while (i < length2) {
k1 k1Var = k1VarArr[i];
if (k1Var != null) {
k1Var.n(f2, d1Var.b);
}
i++;
}
}
@CheckResult
public final c1 u(y.a aVar, long j, long j2) {
u<Object> uVar;
m mVar;
TrackGroupArray trackGroupArray;
u<Object> uVar2;
int i = 0;
this.U = this.U || j != this.E.f774s || !aVar.equals(this.E.f773c);
G();
c1 c1Var = this.E;
TrackGroupArray trackGroupArray2 = c1Var.h;
m mVar2 = c1Var.i;
List<Metadata> list = c1Var.j;
if (this.A.j) {
x0 x0Var = this.f946z.h;
TrackGroupArray trackGroupArray3 = x0Var == null ? TrackGroupArray.i : x0Var.m;
m mVar3 = x0Var == null ? this.l : x0Var.n;
c.i.a.c.f2.g[] gVarArr = mVar3.f864c;
c.i.a.f.e.o.c.n(4, "initialCapacity");
Object[] objArr = new Object[4];
int length = gVarArr.length;
int i2 = 0;
boolean z2 = false;
int i3 = 0;
while (i2 < length) {
c.i.a.c.f2.g gVar = gVarArr[i2];
if (gVar != null) {
Metadata metadata = gVar.d(i).r;
if (metadata == null) {
Metadata metadata2 = new Metadata(new Metadata.Entry[i]);
int i4 = i3 + 1;
if (objArr.length < i4) {
objArr = Arrays.copyOf(objArr, s.b.a(objArr.length, i4));
}
objArr[i3] = metadata2;
i3 = i4;
} else {
int i5 = i3 + 1;
if (objArr.length < i5) {
objArr = Arrays.copyOf(objArr, s.b.a(objArr.length, i5));
}
objArr[i3] = metadata;
i3 = i5;
z2 = true;
}
}
i2++;
i = 0;
}
if (z2) {
uVar2 = u.l(objArr, i3);
} else {
c.i.b.b.a<Object> aVar2 = u.j;
uVar2 = c.i.b.b.q0.k;
}
if (x0Var != null) {
y0 y0Var = x0Var.f;
if (y0Var.f1012c != j2) {
x0Var.f = y0Var.a(j2);
}
}
uVar = uVar2;
trackGroupArray = trackGroupArray3;
mVar = mVar3;
} else if (!aVar.equals(c1Var.f773c)) {
TrackGroupArray trackGroupArray4 = TrackGroupArray.i;
m mVar4 = this.l;
c.i.b.b.a<Object> aVar3 = u.j;
trackGroupArray = trackGroupArray4;
mVar = mVar4;
uVar = c.i.b.b.q0.k;
} else {
mVar = mVar2;
uVar = list;
trackGroupArray = trackGroupArray2;
}
return this.E.b(aVar, j, j2, n(), trackGroupArray, mVar, uVar);
}
public final boolean v() {
x0 x0Var = this.f946z.j;
if (x0Var == null) {
return false;
}
return (!x0Var.d ? 0 : x0Var.a.c()) != Long.MIN_VALUE;
}
public final boolean x() {
x0 x0Var = this.f946z.h;
long j = x0Var.f.e;
return x0Var.d && (j == -9223372036854775807L || this.E.f774s < j || !e0());
}
public final void y() {
boolean z2;
long j;
long j2;
if (!v()) {
z2 = false;
} else {
x0 x0Var = this.f946z.j;
long o = o(!x0Var.d ? 0 : x0Var.a.c());
if (x0Var == this.f946z.h) {
j2 = this.S;
j = x0Var.o;
} else {
j2 = this.S - x0Var.o;
j = x0Var.f.b;
}
z2 = this.m.g(j2 - j, o, this.v.c().b);
}
this.K = z2;
if (z2) {
x0 x0Var2 = this.f946z.j;
long j3 = this.S;
AnimatableValueParser.D(x0Var2.g());
x0Var2.a.g(j3 - x0Var2.o);
}
k0();
}
public final void z() {
d dVar = this.F;
c1 c1Var = this.E;
boolean z2 = dVar.a | (dVar.b != c1Var);
dVar.a = z2;
dVar.b = c1Var;
if (z2) {
o0 o0Var = ((o) this.f945y).a;
o0Var.e.a.post(new t(o0Var, dVar));
this.F = new d(this.E);
}
}
}