# MediaCodecDecoderException

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException.java+class:androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException)

*** ** * ** ***


```
@UnstableApi
class MediaCodecDecoderException : DecoderException
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [androidx.media3.decoder.DecoderException](https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderException) ||
|   |   |   | ↳ | [androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException) |

Known direct subclasses [MediaCodecVideoDecoderException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/MediaCodecVideoDecoderException)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/MediaCodecVideoDecoderException` | Thrown when a failure occurs in a `https://developer.android.com/reference/android/media/MediaCodec.html` video decoder. |

*** ** * ** ***

Thrown when a failure occurs in a `https://developer.android.com/reference/android/media/MediaCodec.html` decoder.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#MediaCodecDecoderException(java.lang.Throwable,androidx.media3.exoplayer.mediacodec.MediaCodecInfo)(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!, codecInfo: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo?)` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#codecInfo()` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo` of the decoder that failed. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#diagnosticInfo()` An optional developer-readable diagnostic information string. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecDecoderException#errorCode()` An optional error code reported by the codec. |

| ### Inherited functions |
|---|
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/set-stack-trace.html(stackTrace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | |

## Public constructors

### MediaCodecDecoderException

```
MediaCodecDecoderException(cause: Throwable!, codecInfo: MediaCodecInfo?)
```

## Public properties

### codecInfo

```
val codecInfo: MediaCodecInfo?
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/mediacodec/MediaCodecInfo` of the decoder that failed. Null if unknown.

### diagnosticInfo

```
val diagnosticInfo: String?
```

An optional developer-readable diagnostic information string. May be null.

### errorCode

```
val errorCode: Int
```

An optional error code reported by the codec. May be 0 if no error code could be obtained.