androidx / androidx/media

MediaCodec.start() fails with CodecException on Honor devices using c2.qti.avc.decoder.secure

Open
#2,786 6 comments 0 reactions 1 assignee View on GitHub

@microkatz is already working on this.

Since Sep 19, 2025.

needs triage question
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
  1. play drm contents
  2. 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.

bug_report.zip

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.