Repository navigation
Closed
Labels
Description
Version
Media3 1.4.0
More version details
From 1.4.0 and up has this issue, downgrading to 1.3.1 fixes it
Devices that reproduce the issue
Amazon FireTV Stick 4K (Mantis)
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
I can provide sample ClearKey link in private to test
Expected result
Media working like in 1.3.1
Actual result
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: Playback error
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:720)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:98)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:154)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:61)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: Caused by: android.media.MediaCodec$CryptoException: Operation not supported in this configuration
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2584)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:108)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1994)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:873)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:1018)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)
09-13 07:39:36.096 18108 18297 E ExoPlayerImplInternal: ... 3 more
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: Disable failed.
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: android.media.MediaCodec$CryptoException: Operation not supported in this configuration
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at android.media.MediaCodec.native_flush(Native Method)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at android.media.MediaCodec.flush(MediaCodec.java:2068)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.flush(SynchronousMediaCodecAdapter.java:168)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:960)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:953)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:780)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:794)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.BaseRenderer.disable(BaseRenderer.java:220)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1846)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1566)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1523)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:722)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:98)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:154)
09-13 07:39:36.097 18108 18297 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:61)
Media
Will send to android-media-github@google.com
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Activity
icbaker commentedon Sep 17, 2024
We didn't receive this. Please re-send it with subject
Issue #1732. Thanks!KingLucius commentedon Sep 20, 2024
Done
icbaker commentedon Sep 20, 2024
The email contains a logcat snippet, not the zip file produced by
adb bugreport. The full bugreport often contains additional info which can help to understand issues. Please runadb bugreportafter reproducing the issue, and email us the resulting zip file, then update this issue.KingLucius commentedon Sep 20, 2024
Updated the email with
adb bugreportzip file result41 remaining items
KingLucius commentedon Dec 17, 2024
As a double-check, I have hardcoded mediaCryptoRequiresSecureDecoder as false and media worked on Fire stick
media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/mediacodec/MediaCodecRenderer.java
Line 587 in df887a9
KingLucius commentedon Dec 22, 2024
Any ETA when this issue can be resolved ?
KingLucius commentedon Feb 7, 2025
Any update?
icbaker commentedon Feb 18, 2025
Looking into this again - my hypothesis from #1732 (comment) can't be correct because in the FireTV BR provided by @KingLucius the device reports its API level as 25 (
[ro.build.version.sdk]: [25]) and the Xiaomi TV looks like it's API 23 (based on the screenshot provided in #2088). Both of these are lower than 31, which is when the frameworkMediaDrm.requiresSecureDecodermethod was added. So this bug can't be about a discrepancy between the return values of the frameworkMediaCryptoandMediaDrmmethods.New, related, hypothesis: We're entering this
catchblock:media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/FrameworkMediaDrm.java
Lines 299 to 305 in 76088cd
@KingLucius Would you be able to add a bit of logging to confirm that?
KingLucius commentedon Feb 21, 2025
FrameworkMediaDrm.requiresSecureDecoder() Exception Exception Details =>android.media.MediaCryptoException: Failed to instantiate crypto object. drmSession.requiresSecureDecoder()=true FrameworkMediaDrm.requiresSecureDecoder() Exception Exception Details =>android.media.MediaCryptoException: Failed to instantiate crypto object.FongMi commentedon Feb 21, 2025
Finally, I make result = fasle when catch expection, it's works.
Tangsan99999 commentedon Feb 25, 2025
wow, its work. thanks @FongMi
Add missing call to `adjustUuid` in `FrameworkMediaDrm`
icbaker commentedon Feb 25, 2025
While looking to make the change to set
result = falsefor ClearKey in thatcatchblock I spotted the probable cause for the exception in the first place - and fixed that too. The fix is in the commit linked above.Add missing call to `adjustUuid` in `FrameworkMediaDrm`