package d3;

import androidx.media3.exoplayer.ExoPlayer;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class r2 extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ ExoPlayer f15959a;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public r2(ExoPlayer exoPlayer, A4.d dVar) {
        super(2, dVar);
        this.f15959a = exoPlayer;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new r2(this.f15959a, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((r2) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        AbstractC2467b.l(obj);
        ExoPlayer exoPlayer = this.f15959a;
        Long l = new Long(exoPlayer.getDuration());
        if (l.longValue() <= 0) {
            l = null;
        }
        long jLongValue = l != null ? l.longValue() : 0L;
        long currentPosition = exoPlayer.getCurrentPosition();
        return new w4.k(new Long(currentPosition >= 0 ? currentPosition : 0L), new Long(jLongValue));
    }
}
