package androidx.media3.decoder.ffmpeg;

import android.media.AudioDeviceInfo;
import android.os.Handler;
import android.os.SystemClock;
import android.os.Trace;
import androidx.media3.decoder.DecoderException;
import androidx.media3.decoder.SimpleDecoderOutputBuffer;
import androidx.media3.exoplayer.ExoPlaybackException;
import androidx.media3.exoplayer.audio.AudioSink$ConfigurationException;
import androidx.media3.exoplayer.audio.AudioSink$InitializationException;
import androidx.media3.exoplayer.audio.AudioSink$WriteException;
import defpackage.AbstractC0799;
import defpackage.AbstractC0956;
import defpackage.AbstractC2704;
import defpackage.AbstractC3589;
import defpackage.AbstractC3661;
import defpackage.AbstractC4208;
import defpackage.AbstractC4509;
import defpackage.C0191;
import defpackage.C1619;
import defpackage.C2136;
import defpackage.C2353;
import defpackage.C2537;
import defpackage.C3008;
import defpackage.C4100;
import defpackage.C4394;
import defpackage.C4683;
import defpackage.C4688;
import defpackage.C4753;
import defpackage.C5286;
import defpackage.InterfaceC0796;
import defpackage.InterfaceC0820;
import defpackage.InterfaceC2890;
import defpackage.InterfaceC4099;
import defpackage.InterfaceC4417;
import defpackage.InterfaceC5154;
import defpackage.RunnableC4020;
import defpackage.RunnableC4076;

/* JADX INFO: renamed from: androidx.media3.decoder.ffmpeg.ʽˈˋ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0013 extends AbstractC0799 implements InterfaceC0796 {

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public final C3008 f576;

    /* JADX INFO: renamed from: ʿᵿʽᵞ, reason: contains not printable characters */
    public InterfaceC4417 f577;

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public InterfaceC0820 f578;

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public boolean f579;

    /* JADX INFO: renamed from: ˁᵺˈ, reason: contains not printable characters */
    public long f580;

    /* JADX INFO: renamed from: ˆʤᵳ, reason: contains not printable characters */
    public long f581;

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public C2537 f582;

    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    public boolean f583;

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public int f584;

    /* JADX INFO: renamed from: ˋʿᐧ, reason: contains not printable characters */
    public boolean f585;

    /* JADX INFO: renamed from: ˋᵯᵩ, reason: contains not printable characters */
    public boolean f586;

    /* JADX INFO: renamed from: ˏʜᵪ, reason: contains not printable characters */
    public boolean f587;

    /* JADX INFO: renamed from: ˏᵩʨ, reason: contains not printable characters */
    public C3008 f588;

    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public boolean f589;

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public final InterfaceC2890 f590;

    /* JADX INFO: renamed from: ᵗᵭ, reason: contains not printable characters */
    public long f591;

    /* JADX INFO: renamed from: ᵘᵝ, reason: contains not printable characters */
    public boolean f592;

    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    public SimpleDecoderOutputBuffer f593;

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public boolean f594;

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public int f595;

    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    public InterfaceC4417 f596;

    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    public int f597;

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public C5286 f598;

    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public final long[] f599;

    /* JADX INFO: renamed from: ᵬᵦˋ, reason: contains not printable characters */
    public boolean f600;

    /* JADX INFO: renamed from: ᵮᵟᵡ, reason: contains not printable characters */
    public long f601;

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public final ˊˊᵞᵽ f602;

    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public int f603;

    /* JADX INFO: renamed from: ᵹʾᵢᵯ, reason: contains not printable characters */
    public long f604;

    public C0013(Handler handler, InterfaceC5154 interfaceC5154, InterfaceC2890 interfaceC2890) {
        super(1);
        this.f602 = new ˊˊᵞᵽ(handler, interfaceC5154);
        this.f590 = interfaceC2890;
        this.f576 = new C3008(0, 0);
        this.f597 = 0;
        this.f583 = true;
        m382(-9223372036854775807L);
        this.f599 = new long[10];
        this.f581 = -9223372036854775807L;
        this.f604 = -9223372036854775807L;
        this.f601 = -9223372036854775807L;
    }

    @Override // defpackage.InterfaceC0796
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final boolean mo372() {
        boolean z = this.f600;
        this.f600 = false;
        return z;
    }

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public final boolean m373() throws ExoPlaybackException {
        if (this.f593 == null) {
            SimpleDecoderOutputBuffer simpleDecoderOutputBuffer = (SimpleDecoderOutputBuffer) ((AbstractC3661) this.f578).mo2937();
            this.f593 = simpleDecoderOutputBuffer;
            if (simpleDecoderOutputBuffer == null) {
                return false;
            }
            int i = simpleDecoderOutputBuffer.f15984;
            if (i > 0) {
                this.f582.f9830 += i;
                this.f590.mo2814();
            }
            if (this.f593.m6278(134217728)) {
                long[] jArr = this.f599;
                this.f590.mo2814();
                if (this.f603 != 0) {
                    m382(jArr[0]);
                    int i2 = this.f603 - 1;
                    this.f603 = i2;
                    System.arraycopy(jArr, 1, jArr, 0, i2);
                }
            }
        }
        if (this.f593.m6278(4)) {
            if (this.f597 == 2) {
                m374();
                m378();
                this.f583 = true;
                return false;
            }
            this.f593.mo359();
            this.f593 = null;
            try {
                this.f589 = true;
                this.f590.mo2809();
                this.f601 = this.f604;
                return false;
            } catch (AudioSink$WriteException e) {
                throw m2900(e, e.f619, e.f620, 5002);
            }
        }
        this.f601 = -9223372036854775807L;
        if (this.f583) {
            FfmpegAudioDecoder ffmpegAudioDecoder = (FfmpegAudioDecoder) this.f578;
            ffmpegAudioDecoder.getClass();
            C4753 c4753 = new C4753();
            c4753.f18101 = AbstractC4208.m9132("audio/raw");
            c4753.f18090 = ffmpegAudioDecoder.f567;
            c4753.f18113 = ffmpegAudioDecoder.f568;
            c4753.f18095 = ffmpegAudioDecoder.f572;
            C4753 c4753M10878 = new C5286(c4753).m10878();
            c4753M10878.f18092 = this.f595;
            c4753M10878.f18091 = this.f584;
            C5286 c5286 = this.f598;
            c4753M10878.f18125 = c5286.f19988;
            c4753M10878.f18121 = c5286.f19992;
            c4753M10878.f18089 = c5286.f19958;
            c4753M10878.f18105 = AbstractC4509.m9559(c5286.f19976);
            C5286 c52862 = this.f598;
            c4753M10878.f18126 = c52862.f19997;
            c4753M10878.f18114 = c52862.f19985;
            c4753M10878.f18129 = c52862.f20000;
            this.f590.mo2829(new C5286(c4753M10878), null);
            this.f583 = false;
        }
        InterfaceC2890 interfaceC2890 = this.f590;
        SimpleDecoderOutputBuffer simpleDecoderOutputBuffer2 = this.f593;
        if (!interfaceC2890.mo2830(1, simpleDecoderOutputBuffer2.f15983, simpleDecoderOutputBuffer2.f562)) {
            this.f601 = this.f593.f15983;
            return false;
        }
        this.f582.f9822++;
        this.f593.mo359();
        this.f593 = null;
        return true;
    }

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public final void m374() {
        this.f588 = null;
        this.f593 = null;
        this.f597 = 0;
        this.f585 = false;
        this.f581 = -9223372036854775807L;
        this.f604 = -9223372036854775807L;
        InterfaceC0820 interfaceC0820 = this.f578;
        if (interfaceC0820 != null) {
            this.f582.f9819++;
            ((FfmpegAudioDecoder) interfaceC0820).mo364();
            String strM362 = ((FfmpegAudioDecoder) this.f578).m362();
            ˊˊᵞᵽ r2 = this.f602;
            Handler handler = (Handler) r2.ᵜᵪʾ;
            if (handler != null) {
                handler.post(new RunnableC4020(5, r2, strM362));
            }
            this.f578 = null;
        }
        AbstractC3589.m8104(this.f577, null);
        this.f577 = null;
    }

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public final void m375(ˊˊᵞᵽ r10) throws ExoPlaybackException {
        C5286 c5286 = (C5286) r10.ᵔᵖᵹᵫ;
        c5286.getClass();
        InterfaceC4417 interfaceC4417 = (InterfaceC4417) r10.ᵜᵪʾ;
        AbstractC3589.m8104(this.f596, interfaceC4417);
        this.f596 = interfaceC4417;
        C5286 c52862 = this.f598;
        this.f598 = c5286;
        this.f595 = c5286.f19961;
        this.f584 = c5286.f19971;
        InterfaceC0820 interfaceC0820 = this.f578;
        ˊˊᵞᵽ r8 = this.f602;
        if (interfaceC0820 == null) {
            m378();
            C5286 c52863 = this.f598;
            Handler handler = (Handler) r8.ᵜᵪʾ;
            if (handler != null) {
                handler.post(new RunnableC4076(r8, c52863, null, 6));
                return;
            }
            return;
        }
        C4394 c4394 = interfaceC4417 != this.f577 ? new C4394(((FfmpegAudioDecoder) interfaceC0820).m362(), c52862, c5286, 0, 128) : new C4394(((FfmpegAudioDecoder) interfaceC0820).m362(), c52862, c5286, 0, 1);
        if (c4394.f16685 == 0) {
            if (this.f585) {
                this.f597 = 1;
            } else {
                m374();
                m378();
                this.f583 = true;
            }
        }
        C5286 c52864 = this.f598;
        Handler handler2 = (Handler) r8.ᵜᵪʾ;
        if (handler2 != null) {
            handler2.post(new RunnableC4076(r8, c52864, c4394, 6));
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x0049  */
    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int mo376(C5286 c5286) {
        int i;
        String str = c5286.f19987;
        int i2 = c5286.f19966;
        int i3 = c5286.f19984;
        if (!AbstractC4208.m9139(str)) {
            return AbstractC2704.m6526(0, 0, 0, 0);
        }
        String str2 = c5286.f19987;
        str2.getClass();
        if (!FfmpegLibrary.m371() || !AbstractC4208.m9139(str2)) {
            i = 0;
        } else if (FfmpegLibrary.m369(str2)) {
            C5286 c5286M3250 = AbstractC0956.m3250(2, i3, i2);
            InterfaceC2890 interfaceC2890 = this.f590;
            i = 4;
            if (!interfaceC2890.mo2836(c5286M3250) && !interfaceC2890.mo2836(AbstractC0956.m3250(4, i3, i2))) {
                i = 1;
            } else if (c5286.f19959 != 0) {
                i = 2;
            }
        }
        return i <= 2 ? AbstractC2704.m6526(i, 0, 0, 0) : i | 168;
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public final void mo377() {
        this.f590.mo2828();
        this.f592 = true;
    }

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public final void m378() throws ExoPlaybackException {
        ˊˊᵞᵽ r1 = this.f602;
        if (this.f578 != null) {
            return;
        }
        InterfaceC4417 interfaceC4417 = this.f596;
        AbstractC3589.m8104(this.f577, interfaceC4417);
        this.f577 = interfaceC4417;
        if (interfaceC4417 != null && interfaceC4417.mo4234() == null && this.f577.mo4238() == null) {
            return;
        }
        try {
            long jElapsedRealtime = SystemClock.elapsedRealtime();
            Trace.beginSection("createAudioDecoder");
            InterfaceC0820 interfaceC0820M387 = m387(this.f598);
            this.f578 = interfaceC0820M387;
            ((AbstractC3661) interfaceC0820M387).mo2935(this.f3593);
            Trace.endSection();
            long jElapsedRealtime2 = SystemClock.elapsedRealtime();
            String strM362 = ((FfmpegAudioDecoder) this.f578).m362();
            long j = jElapsedRealtime2 - jElapsedRealtime;
            Handler handler = (Handler) r1.ᵜᵪʾ;
            if (handler != null) {
                handler.post(new RunnableC4020(r1, strM362, jElapsedRealtime2, j));
            }
            this.f582.f9825++;
        } catch (DecoderException e) {
            ˋˀᵧ.ˋˈ("Audio codec error", e);
            Handler handler2 = (Handler) r1.ᵜᵪʾ;
            if (handler2 != null) {
                handler2.post(new RunnableC4020(0, r1, e));
            }
            throw m2900(e, this.f598, false, 4001);
        } catch (OutOfMemoryError e2) {
            throw m2900(e2, this.f598, false, 4001);
        }
    }

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public final void m379() {
        long jMo2826 = this.f590.mo2826(mo393());
        if (jMo2826 != Long.MIN_VALUE) {
            if (!this.f586) {
                jMo2826 = Math.max(this.f580, jMo2826);
            }
            this.f580 = jMo2826;
            this.f586 = false;
        }
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public final void mo380(C5286[] c5286Arr, long j, long j2, C4100 c4100) {
        this.f579 = false;
        if (this.f591 == -9223372036854775807L) {
            m382(j2);
            return;
        }
        int i = this.f603;
        long[] jArr = this.f599;
        if (i == jArr.length) {
            ˋˀᵧ.ʿٴˇ("Too many stream changes, so dropping offset: " + jArr[this.f603 - 1]);
        } else {
            this.f603 = i + 1;
        }
        jArr[this.f603 - 1] = j2;
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final long mo381(long j, long j2) {
        InterfaceC2890 interfaceC2890 = this.f590;
        boolean z = interfaceC2890.mo2838() && this.f601 != -9223372036854775807L;
        if (this.f592) {
            long jMo2827 = interfaceC2890.mo2827();
            if (this.f587 && z && jMo2827 != -9223372036854775807L) {
                return Math.max(10000L, (long) ((Math.min(jMo2827, this.f601 - j) / (interfaceC2890.mo2833() != null ? interfaceC2890.mo2833().f17813 : 1.0f)) / 2.0f));
            }
        } else if (z || this.f589) {
            return 1000000L;
        }
        return 10000L;
    }

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public final void m382(long j) {
        this.f591 = j;
        if (j != -9223372036854775807L) {
            this.f590.getClass();
        }
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final void mo383() {
        ˊˊᵞᵽ r0 = this.f602;
        this.f598 = null;
        this.f583 = true;
        m382(-9223372036854775807L);
        this.f600 = false;
        this.f587 = false;
        this.f601 = -9223372036854775807L;
        try {
            AbstractC3589.m8104(this.f596, null);
            this.f596 = null;
            m374();
            this.f590.reset();
        } finally {
            r0.ᵻʽᵯ(this.f582);
        }
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final int mo384() {
        return 8;
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final void mo385() {
        m379();
        this.f590.mo2824();
        this.f592 = false;
        this.f587 = false;
    }

    @Override // defpackage.AbstractC0799, defpackage.InterfaceC1896
    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final void mo386(int i, Object obj) {
        InterfaceC2890 interfaceC2890 = this.f590;
        if (i == 2) {
            interfaceC2890.mo2808(((Float) obj).floatValue());
            return;
        }
        if (i == 3) {
            interfaceC2890.mo2806((C4683) obj);
            return;
        }
        if (i == 6) {
            interfaceC2890.mo2818((C0191) obj);
            return;
        }
        if (i == 12) {
            interfaceC2890.setPreferredDevice((AudioDeviceInfo) obj);
            return;
        }
        if (i == 9) {
            interfaceC2890.mo2834(((Boolean) obj).booleanValue());
            return;
        }
        if (i == 10) {
            interfaceC2890.mo2835(((Integer) obj).intValue());
            return;
        }
        if (i == 19) {
            obj.getClass();
            interfaceC2890.mo2825(((Integer) obj).intValue());
        } else {
            if (i != 20) {
                return;
            }
            obj.getClass();
            interfaceC2890.mo2821((InterfaceC4099) obj);
        }
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final InterfaceC0820 m387(C5286 c5286) {
        Trace.beginSection("createFfmpegAudioDecoder");
        int i = c5286.f19983;
        int i2 = c5286.f19966;
        int i3 = c5286.f19984;
        if (i == -1) {
            i = 5760;
        }
        C5286 c5286M3250 = AbstractC0956.m3250(2, i3, i2);
        InterfaceC2890 interfaceC2890 = this.f590;
        FfmpegAudioDecoder ffmpegAudioDecoder = new FfmpegAudioDecoder(i, c5286, interfaceC2890.mo2836(c5286M3250) ? interfaceC2890.mo2811(AbstractC0956.m3250(4, i3, i2)) != 2 ? false : true ^ "audio/ac3".equals(c5286.f19987) : true);
        Trace.endSection();
        return ffmpegAudioDecoder;
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final void mo388(long j, long j2) throws ExoPlaybackException {
        if (this.f589) {
            try {
                this.f590.mo2809();
                this.f601 = this.f604;
                return;
            } catch (AudioSink$WriteException e) {
                throw m2900(e, e.f619, e.f620, 5002);
            }
        }
        if (this.f598 == null) {
            ˊˊᵞᵽ r3 = this.f3590;
            r3.ᵻˈᵦʼ();
            this.f576.mo7091();
            int iM2893 = m2893(r3, this.f576, 2);
            if (iM2893 != -5) {
                if (iM2893 == -4) {
                    ᵻᵪ.ˌᴵ(this.f576.m6278(4));
                    this.f594 = true;
                    try {
                        this.f589 = true;
                        this.f590.mo2809();
                        this.f601 = this.f604;
                        return;
                    } catch (AudioSink$WriteException e2) {
                        throw m2900(e2, null, false, 5002);
                    }
                }
                return;
            }
            m375(r3);
        }
        m378();
        if (this.f578 != null) {
            try {
                Trace.beginSection("drainAndFeed");
                while (m373()) {
                }
                while (m391()) {
                }
                Trace.endSection();
                synchronized (this.f582) {
                }
            } catch (DecoderException e3) {
                ˋˀᵧ.ˋˈ("Audio codec error", e3);
                ˊˊᵞᵽ r4 = this.f602;
                Handler handler = (Handler) r4.ᵜᵪʾ;
                if (handler != null) {
                    handler.post(new RunnableC4020(0, r4, e3));
                }
                throw m2900(e3, this.f598, false, 4003);
            } catch (AudioSink$ConfigurationException e4) {
                throw m2900(e4, e4.f615, false, 5001);
            } catch (AudioSink$InitializationException e5) {
                throw m2900(e5, e5.f617, e5.f616, 5001);
            } catch (AudioSink$WriteException e6) {
                throw m2900(e6, e6.f619, e6.f620, 5002);
            }
        }
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final boolean mo389() {
        return this.f590.mo2838();
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final void mo390(long j, boolean z, boolean z2) throws ExoPlaybackException {
        this.f590.flush();
        this.f580 = j;
        this.f601 = -9223372036854775807L;
        this.f600 = false;
        this.f587 = false;
        this.f586 = true;
        this.f594 = false;
        this.f589 = false;
        if (this.f578 != null) {
            if (this.f597 != 0) {
                m374();
                m378();
                return;
            }
            this.f588 = null;
            SimpleDecoderOutputBuffer simpleDecoderOutputBuffer = this.f593;
            if (simpleDecoderOutputBuffer != null) {
                simpleDecoderOutputBuffer.mo359();
                this.f593 = null;
            }
            InterfaceC0820 interfaceC0820 = this.f578;
            interfaceC0820.getClass();
            AbstractC3661 abstractC3661 = (AbstractC3661) interfaceC0820;
            abstractC3661.flush();
            abstractC3661.mo2935(this.f3593);
            this.f585 = false;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0022  */
    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean m391() throws ExoPlaybackException {
        InterfaceC0820 interfaceC0820 = this.f578;
        if (interfaceC0820 != null && this.f597 != 2 && !this.f594) {
            if (this.f588 == null) {
                C3008 c3008 = (C3008) ((AbstractC3661) interfaceC0820).mo2936();
                this.f588 = c3008;
                if (c3008 != null) {
                    if (this.f597 == 1) {
                        C3008 c30082 = this.f588;
                        c30082.f9866 = 4;
                        AbstractC3661 abstractC3661 = (AbstractC3661) this.f578;
                        abstractC3661.getClass();
                        abstractC3661.mo2938(c30082);
                        this.f588 = null;
                        this.f597 = 2;
                        return false;
                    }
                    ˊˊᵞᵽ r0 = this.f3590;
                    r0.ᵻˈᵦʼ();
                    int iM2893 = m2893(r0, this.f588, 0);
                    if (iM2893 == -5) {
                        m375(r0);
                        return true;
                    }
                    if (iM2893 == -4) {
                        if (this.f588.m6278(4)) {
                            this.f594 = true;
                            this.f604 = this.f581;
                            InterfaceC0820 interfaceC08202 = this.f578;
                            C3008 c30083 = this.f588;
                            AbstractC3661 abstractC36612 = (AbstractC3661) interfaceC08202;
                            abstractC36612.getClass();
                            abstractC36612.mo2938(c30083);
                            this.f588 = null;
                            return false;
                        }
                        if (!this.f579) {
                            this.f579 = true;
                            this.f588.m6277(134217728);
                        }
                        this.f581 = this.f588.f11577;
                        if (m2899() || this.f588.m6278(536870912)) {
                            this.f604 = this.f581;
                        }
                        this.f588.m7092();
                        C3008 c30084 = this.f588;
                        c30084.f11580 = this.f598;
                        AbstractC3661 abstractC36613 = (AbstractC3661) this.f578;
                        abstractC36613.getClass();
                        abstractC36613.mo2938(c30084);
                        this.f585 = true;
                        this.f582.f9821++;
                        this.f588 = null;
                        return true;
                    }
                    if (iM2893 != -3) {
                        ᵷᵝˎ.ᵱʡˏ();
                        return false;
                    }
                    if (m2899()) {
                        this.f604 = this.f581;
                        return false;
                    }
                }
            }
        }
        return false;
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final void mo392(boolean z, boolean z2) {
        C2537 c2537 = new C2537();
        this.f582 = c2537;
        ˊˊᵞᵽ r5 = this.f602;
        Handler handler = (Handler) r5.ᵜᵪʾ;
        if (handler != null) {
            handler.post(new RunnableC4020(6, r5, c2537));
        }
        C1619 c1619 = this.f3594;
        c1619.getClass();
        boolean z3 = c1619.f6483;
        InterfaceC2890 interfaceC2890 = this.f590;
        if (z3) {
            interfaceC2890.mo2820();
        } else {
            interfaceC2890.mo2822();
        }
        C2136 c2136 = this.f3596;
        c2136.getClass();
        interfaceC2890.mo2812(c2136);
        C2353 c2353 = this.f3583;
        c2353.getClass();
        interfaceC2890.mo2803(c2353);
        interfaceC2890.mo2804(new ᵧᵙᵤ(14, this));
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final boolean mo393() {
        return this.f589 && this.f590.mo2800();
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final String mo394() {
        return "FfmpegAudioRenderer";
    }

    @Override // defpackage.InterfaceC0796
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final long mo395() {
        if (this.f3588 == 2) {
            m379();
        }
        return this.f580;
    }

    @Override // defpackage.InterfaceC0796
    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final C4688 mo396() {
        return this.f590.mo2833();
    }

    @Override // defpackage.AbstractC0799
    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final InterfaceC0796 mo397() {
        return this;
    }

    @Override // defpackage.InterfaceC0796
    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final void mo398(C4688 c4688) {
        this.f590.mo2839(c4688);
    }
}
