package defpackage;

import android.os.SystemClock;
import androidx.media3.common.util.StuckPlayerException;
import androidx.media3.exoplayer.ExoPlaybackException;
import j$.util.Objects;

/* renamed from: ᵩᵰ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C3832 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public boolean f14239;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final /* synthetic */ C3423 f14240;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public long f14241;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f14242;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final int f14243;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public Object f14244;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f14245;

    public C3832(C3423 c3423, int i) {
        this.f14240 = c3423;
        this.f14243 = i;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m8474() {
        long jM8651;
        C3423 c3423 = this.f14240;
        C4479 c4479 = (C4479) c3423.f12724;
        C5073 c5073 = (C5073) c3423.f12726;
        C3916 c3916 = (C3916) c3423.f12727;
        AbstractC0488 abstractC0488M8641 = c3916.m8641();
        Object objMo2116 = abstractC0488M8641.m2115() ? null : abstractC0488M8641.mo2116(c3916.m8652());
        int iM8653 = c3916.m8653();
        int iM8628 = c3916.m8628();
        long jM8615 = c3916.m8615();
        if (objMo2116 == null || iM8653 != -1) {
            jM8651 = iM8653 != -1 ? c3916.m8651() : -9223372036854775807L;
        } else {
            abstractC0488M8641.mo2117(objMo2116, c4479);
            jM8615 -= AbstractC3558.m8161(c4479.f16705);
            jM8651 = AbstractC3558.m8161(c4479.f16711);
        }
        boolean zM8606 = c3916.m8606();
        if (!zM8606 || jM8651 == -9223372036854775807L || jM8615 < jM8651) {
            c5073.m10535(3);
            if (zM8606 && jM8651 != -9223372036854775807L) {
                c3916.m8604();
                c5073.f18953.sendEmptyMessageDelayed(3, (int) Math.ceil((jM8651 - jM8615) / c3916.f14769.f17255.f1306));
            }
            this.f14239 = false;
            return;
        }
        ((C1875) c3423.f12730).getClass();
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        boolean z = this.f14239;
        int i = this.f14243;
        if (z && Objects.equals(objMo2116, this.f14244) && iM8653 == this.f14242 && iM8628 == this.f14245) {
            if (jElapsedRealtime - this.f14241 >= i) {
                ((SurfaceHolderCallbackC4282) c3423.f12729).f16066.m8605(new ExoPlaybackException(2, new StuckPlayerException(3, i), 1003));
                return;
            }
            return;
        }
        this.f14239 = true;
        this.f14241 = jElapsedRealtime;
        this.f14244 = objMo2116;
        this.f14242 = iM8653;
        this.f14245 = iM8628;
        c5073.m10535(3);
        c5073.f18953.sendEmptyMessageDelayed(3, i);
    }
}
