ExoPlayer: Decoder failed: OMX.qcom.video.decoder.hevc.secure for UHD/SDR asset

ExoPlayer Version

2.17.1

Description of the issue

Playback fails attempting to reproduce a UHD/SDR asset (drm encrypted).

2022-03-29 11:47:35.337 8417-8417/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [eventTime=18.47, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_DECODING_FAILED
      com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(video_533951, null, null, video/hevc, hvc1.1.6.L63.90, 533951, null, [640, 360, 23.976025], [-1, -1]), format_supported=YES
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:575)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:246)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.qcom.video.decoder.hevc.secure
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1512)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:815)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:998)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:499)
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:246) 
        at android.os.HandlerThread.run(HandlerThread.java:67) 
     Caused by: java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
        at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3452)
        at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:106)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1833)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:793)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:998) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:499) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:246) 
        at android.os.HandlerThread.run(HandlerThread.java:67) 

The issue seems to be reproducible in devices with a Qualcomm chipset and Android 11+. Same UHD/HDR (drm encrypted) or same UHD/SDR (clear) assets playbacks fine.

Devices that reproduce the issue

  • Samsung Galaxy Z Fold2 5G SM-F916B (samsung/f2qxeea/f2q) Android 11 Qualcomm SM8250 Snapdragon 865 5G+ (7 nm+)

  • Google Pixel 5 (google/redfin/redfin) Android 12 Qualcomm SM7250 Snapdragon 765G 5G (7 nm)

  • Oneplus 8T 5G KB2003 Android 11 Qualcomm SM8250 Snapdragon 865 5G (7 nm+)

  • Samsung Galaxy Tab S7+ SM-T970N Android 11 Qualcomm SM8250 Snapdragon 865 5G+ (7 nm+)

Devices that do not reproduce the issue

  • OnePlus OnePlus6T A6013 (OnePlus/OnePlus6T/OnePlus6T) Android 10 Qualcomm SDM845 Snapdragon 845 (10 nm)

  • Any no Qualcomm device or Android 10 or below

Reproducible in the demo app?

Yes

Reproduction steps

  1. Open demo app and playback provided asset and DRM license
  2. After a few seconds playback fails with Decoder failed: OMX.qcom.video.decoder.hevc.secure

Expected result

Playback should succeed

Actual result

Playback fails.

Media

I’ll provide media through dev.exoplayer@gmail.com mailing list

Bug Report

  • You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 18 (9 by maintainers)

Most upvoted comments

We have been able to reproduce the problem and are working internally with other teams to identify the root cause.

Thanks. We are trying to reproduce and capture logs for Qualcomm.

Sorry for the delay. Looking through the bugreports that you shared it appears to be a decoder issue. Here is the one from Samsung Galaxy Z Fold2 5G SM-F916B.zip

03-28 13:05:07.889  1046  1240 27912 E OMX-VDEC-1080P: OMX_COMPONENT_GENERATE_HARDWARE_ERROR
03-28 13:05:07.889  1046  1240 27912 E OMX-VDEC-1080P: ERROR: Sending OMX_ErrorHardware to Client
03-28 13:05:07.889 10328 14627 27909 E ACodec  : [OMX.qcom.video.decoder.hevc.secure] ERROR(0x80001009)
03-28 13:05:07.889 10328 14627 27909 E ACodec  : signalError(omxError 0x80001009, internalError -2147483648)
03-28 13:05:07.890 10328 14627 27908 E MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 6
03-28 13:05:07.890 10328 14627 27908 D SurfaceUtils: disconnecting from surface 0x738a8fe750, reason disconnectFromSurface
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer: Video codec error
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:   java.lang.IllegalStateException
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3452)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:106)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1806)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:792)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:998)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:499)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at android.os.Handler.dispatchMessage(Handler.java:102)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at android.os.Looper.loop(Looper.java:246)
03-28 13:05:07.900 10328 14627 27863 E MediaCodecVideoRenderer:       at android.os.HandlerThread.run(HandlerThread.java:67)
03-28 13:05:07.903 10328 14627 27863 E ExoPlayerImplInternal: Playback error

If you share a license URL we work with Qualcomm (who supplies the SoC) to investigate. In the past issues like this have been related to a bug or issue triggered by a particular encoding configuration. Since it is possible that not all devices will receive a fix prepared in the future, it might be worthwhile tweaking your encoding parameters and seeing if that helps. Do let us know whenever you have a license URL that we can use.