Rabbit-R1/original r1/java/sources/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException.java
2024-05-21 17:08:36 -04:00

24 lines
896 B
Java

package androidx.media3.exoplayer.mediacodec;
import android.media.MediaCodec;
import androidx.media3.common.util.Util;
import androidx.media3.decoder.DecoderException;
/* loaded from: classes2.dex */
public class MediaCodecDecoderException extends DecoderException {
public final MediaCodecInfo codecInfo;
public final String diagnosticInfo;
public MediaCodecDecoderException(Throwable th, MediaCodecInfo mediaCodecInfo) {
super("Decoder failed: " + (mediaCodecInfo == null ? null : mediaCodecInfo.name), th);
this.codecInfo = mediaCodecInfo;
this.diagnosticInfo = Util.SDK_INT >= 21 ? getDiagnosticInfoV21(th) : null;
}
private static String getDiagnosticInfoV21(Throwable th) {
if (th instanceof MediaCodec.CodecException) {
return ((MediaCodec.CodecException) th).getDiagnosticInfo();
}
return null;
}
}