ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

MediaCryptoException during offline playback for the dash widevine video.

Open AntonAFA opened this issue 9 years ago • 1 comments

Hello guys. I am working with exoplayer2.1.1 version. I am downloading dash widevine video. After the download, i am obtaining the keySetId and storing it locally. Also, i have custom implementation of the DrmSessionManager that knows how to open offline session and create MediaCrypto.

When i am playing this video in offline, and seeking a couple of times i got this kind of exception:

E/ExoPlayerImplInternal: Renderer error.
                         com.google.android.exoplayer2.ExoPlaybackException
                             at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:666)
                             at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:485)
                             at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:479)
                             at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:315)
                             at android.os.Handler.dispatchMessage(Handler.java:98)
                             at android.os.Looper.loop(Looper.java:148)
                             at android.os.HandlerThread.run(HandlerThread.java:61)
                             at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
                          Caused by: android.media.MediaCodec$CryptoException: Error decrypting data: session not found, possibly reclaimed
                             at

It looks like it happened when exoplayer is trying to call

 codec.queueSecureInputBuffer(inputIndex, 0, cryptoInfo, presentationTimeUs, 0);

in MediaCodecRenderer line 657. The error code of the CryptoException is:

public static final int ERROR_SESSION_NOT_OPENED = 5;

I saw from the previous threads that something similar happened in exoplayer v1 . I would like to know if you have any ideas on the subject.

AntonAFA avatar Jan 11 '17 17:01 AntonAFA

The information provided here isn't detailed enough for us to help. Please provide all of the information requested in our issue template (including a full bug report captured with "adb bugreport"). Thanks.

ojw28 avatar Jun 24 '17 13:06 ojw28