MediaCodec.start() fails with CodecException on Honor devices using c2.qti.avc.decoder.secure
@microkatz is already working on this.
Since Sep 19, 2025.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
- Media3 1.8.0
More version details
- Playback type: HLS with Widevine DRM
- Video format: H.264 / AVC (
avc1.4D401E), resolution 640x360 - DRM security level: L1
- Device API levels: Android 12 to Android 15
Why does video playback fail with CodecException on Honor and Oppo despite successful DRM session creation? Can Media3 improve handling of secure decoder failures on Qualcomm-based devices with C2 codec implementation?
Devices that reproduce the issue
- Honor 200 pro; Android 15.
- Oppo cph2591, Android 12.
Devices that do not reproduce the issue
- One Plus 12, Android 15.
- Realme, Android 13.
- Redmi, Android 13.
Reproducible in the demo app?
- Yes
Reproduction steps
- play drm contents
- video start
Expected result
- video start playing
Actual result
Playback fails immediately with a MediaCodec$CodecExceptionduring decoder initialization. The error occurs specifically when trying to initialize the secure decoderc2.qti.avc.decoder.secure.
The provided log file:
androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error
at androidx.media3.exoplayer.BaseRenderer.createRendererException(BaseRenderer.java:545)
Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecRenderer$DecoderInitializationException:
Decoder init failed: c2.qti.avc.decoder.secure, Format(... video/avc ...)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1226)
Caused by: android.media.MediaCodec$CodecException:
at android.media.MediaCodec.native_start(Native Method)
at android.media.MediaCodec.start(MediaCodec.java:2574)
Bug Report
You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.