Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L3 Widevine provisioning fails #1925

Closed
mlondon1 opened this issue Oct 10, 2016 · 17 comments
Closed

L3 Widevine provisioning fails #1925

mlondon1 opened this issue Oct 10, 2016 · 17 comments

Comments

@mlondon1
Copy link

Hi,
We see some older Android devices (4.4.2) only work with Level 3 security, while some newer devices only work with Level 1. This is not always the case, though.

What is the recommended approach for determining if a device supports one or the other in order to trigger one of the other like so:

mediaDrm.setPropertyString("securityLevel", "L3");

@ojw28
Copy link
Contributor

ojw28 commented Oct 10, 2016

  • I'm pretty sure all devices should work with L3. If you know of devices where forcing L3 with setPropertyString doesn't work, please let us know exactly which models and OS versions. Ideally please provide bug reports so we can take a look.
  • A MediaDrm should default to its best supported level without you having to do anything. Once you've instantiated a MediaDrm instance, you can query its level using mediaDrm.getPropertyString("securityLevel"). If the best supported level is L1 then it should be possible for you to force L3 by calling mediaDrm.setPropertyString("securityLevel", "L3"). If the best supported level is L3 then you will not be able to force L1. You can query the level again after an attempt to force to see whether forcing was successful. Forcing of level is only allowed prior to opening any sessions.

@ojw28 ojw28 added the question label Oct 10, 2016
@mlondon1
Copy link
Author

Some of these devices play successfully with Widevine-Dash content in Exoplayer 2.0.2 with Level 1 but not with Level 3.

samsung Galaxy S5 SM-G900F Android 5
Motorola Moto X (2nd gen) Android 5.1
HTC 10 HTC6545LVM Android 6.0.1

We have seen errors such as:
10-07 12:13:00.734 364-364/? W/WVCdm: DeviceFiles::RetrieveFile: /data/mediadrm/IDM1013/L3/cert.bin does not exist

@wvpaf
Copy link

wvpaf commented Oct 11, 2016

@mlondon1 we reviewed a HTC10 log provided via email. The 'error' above is really a warning and is not the root cause.

The log did not indicate that the error is not in the DRM space.
Here is an interesting bit:
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 404

Could this be an issue in serving up the content? Alternatively we have seen an issue similar to this and the cause was an inaccurate URL in the MPD.

Does this content fail on all devices or just some devices?

@mlondon1
Copy link
Author

mlondon1 commented Oct 11, 2016

The http 404 is not the license server nor for the Dash content. I watch for that in Wireshark during playback.

There seems to be a Google API for a cert in the media codec, could that be if?

On Oct 11, 2016, at 6:23 PM, wvpaf notifications@github.com wrote:

@mlondon1 we reviewed a HTC10 log provided via email. The 'error' above is really a warning and is not the root cause.

The log did not indicate that the error is not in the DRM space.
Here is an interesting bit:
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 404

Could this be an issue in serving up the content? Alternatively we have seen an issue similar to this and the cause was an inaccurate URL in the MPD.

Does this content fail on all devices or just some devices?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@mlondon1
Copy link
Author

mlondon1 commented Oct 12, 2016

This is what I was talking about that seems to be requested as the provisioning profile?

https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=< Key withheld>

The full stack trace shows that it is the provisioning request in the Exoplayer DRM code:

10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): com.google.android.exoplayer2.ExoPlaybackException
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:298)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:474)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:265)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at android.os.Handler.dispatchMessage(Handler.java:98)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at android.os.Looper.loop(Looper.java:168)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at android.os.HandlerThread.run(HandlerThread.java:61)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 404
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:212)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:118)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:89)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:79)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.util.Util.toByteArray(Util.java:116)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:107)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeProvisionRequest(HttpMediaDrmCallback.java:74)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at com.google.android.exoplayer2.drm.StreamingDrmSessionManager$PostRequestHandler.handleMessage(StreamingDrmSessionManager.java:513)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at android.os.Handler.dispatchMessage(Handler.java:102)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at android.os.Looper.loop(Looper.java:168)
10-11 14:14:52.222: E/ExoPlayerImplInternal(14445): at android.os.HandlerThread.run(HandlerThread.java:61)

@mlondon1
Copy link
Author

Note that this 404 happens with the Widevine Secure HD content on HTC 10 (Android 6.0.1) as well, when setting security level to 3. Staying in level 1 does not exhibit this issue.

@ojw28
Copy link
Contributor

ojw28 commented Oct 13, 2016

@wvpaf / @jefftinker - This looks quite serious. When the CDM requests provisioning, we generate the URL to which the request is sent as:

String url = request.getDefaultUrl() + "&signedRequest=" + new String(request.getData());

But we're seeing 404s. This seems to occur across all devices.

@ojw28
Copy link
Contributor

ojw28 commented Oct 13, 2016

@mlondon1 - How are you implementing executeProvisionRequest? If you've taken ExoPlayer's default implementation, please try nulling out the request properties so that the Content-Type property doesn't get set. This appears to fix the issue when I tried it.

@mlondon1
Copy link
Author

@ojw28 Yes I am taking the default implementation. Could you provide some assistance on that ?

@ojw28
Copy link
Contributor

ojw28 commented Oct 13, 2016

Yes. This is an unfortunate issue that I think we introduced as part of our work to support Cronet via an extension. Investigating possible fixes now.

@ojw28 ojw28 added bug and removed question labels Oct 13, 2016
@ojw28 ojw28 changed the title [Question] How to determine if a device supports Level 1 and/or Level 3 crypto security? L3 Widevine provisioning fails Oct 13, 2016
ojw28 added a commit that referenced this issue Oct 13, 2016
Issue #1925

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136035192
@ojw28
Copy link
Contributor

ojw28 commented Oct 13, 2016

The change above fixes V1, where the issue was introduced as a regression in r1.5.11. We'll push a fix for V2 tomorrow.

ojw28 added a commit that referenced this issue Oct 14, 2016
1. HttpMediaDrmCallback.executeProvisionRequest needs to specify
   an empty byte[], else we do a GET instead of a POST.
2. Content-Type should not be set when making the provision
   request, since there's no body.
3. DataSource implementations must correctly handle a non-null
   body with zero length. CronetDataSource was not handling this
   case. DefaultHttpDataSource was, but made a code modification
   to make it a little clearer. OkHttpDataSource seems to handle
   the case correctly, and it doens't look like the code can be
   made clearer.

Issue #1925

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136042641
@ojw28
Copy link
Contributor

ojw28 commented Oct 14, 2016

This should now be fixed in dev-v2. Sorry for the inconvenience. We'll cut another release probably early next week that includes the fix. If you could verify the fix in the meantime, that would be great.

@ojw28 ojw28 closed this as completed Oct 14, 2016
@mlondon1
Copy link
Author

mlondon1 commented Oct 14, 2016

This seems to have broken L1 playback for some devices such as
Samsung Tab S2 SM-T810 6.0.1

10-14 16:35:40.615 3437-4553/? E/Watchdog: !@Sync 797 [10-14 16:35:40.620]
10-14 16:35:40.985 4336-4336/? D/NetworkController: updateCarrierText : ATV VOD
10-14 16:35:42.275 3437-4207/? D/SensorService: [SO] -5.070 -0.370 8.096
10-14 16:35:42.795 31441-31441/com.google.android.exoplayer2.demo D/EventLogger: videoFormatChanged [13.47, id=video=4500360, mimeType=video/avc, bitrate=4500360, res=1920x1080, fps=23.976025]
10-14 16:35:42.990 2699-31593/? E/libexynosv4l2: failed to ioctl: VIDIOC_G_CTRL (22 - Invalid argument)
10-14 16:35:42.990 4336-4336/? D/NetworkController: updateCarrierText : ATV VOD
10-14 16:35:42.990 2699-31593/? W/libexynosv4l2: failed to ioctl: VIDIOC_DQBUF (22 - Invalid argument)
10-14 16:35:42.990 31441-31583/com.google.android.exoplayer2.demo I/ACodec: [OMX.Exynos.avc.dec.secure] Now handling output port settings change
10-14 16:35:42.995 31441-31583/com.google.android.exoplayer2.demo W/AHierarchicalStateMachine: Warning message AMessage(what = 'omxI') = {
                                                                                                 int32_t type = 0
                                                                                                 int32_t event = 3
                                                                                                 int32_t data1 = 1
                                                                                                 int32_t data2 = 117440527
                                                                                               } unhandled in root state.
10-14 16:35:43.315 31441-31583/com.google.android.exoplayer2.demo D/SurfaceUtils: set up nativeWindow 0xadf66808 for 1920x1088, color 0x105, rotation 0, usage 0x806900
10-14 16:35:43.315 2699-2699/? E/OMXNodeInstance: setParameter(4e:Exynos.avc.dec.secure, ParamPortDefinition(0x2000001)) ERROR: BadParameter(0x80001005)
10-14 16:35:43.315 31441-31583/com.google.android.exoplayer2.demo W/ACodec: [OMX.Exynos.avc.dec.secure] setting nBufferCountActual to 13 failed: -2147483648
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 2667-4791/? D/libEGL: eglTerminate EGLDisplay = 0xb29cf63c
10-14 16:35:43.320 31441-31583/com.google.android.exoplayer2.demo I/ACodec: [OMX.Exynos.avc.dec.secure] configureOutputBuffersFromNativeWindow setBufferCount : 12, minUndequeuedBuffers : 3
10-14 16:35:43.330 31441-31583/com.google.android.exoplayer2.demo I/ACodec: [OMX.Exynos.avc.dec.secure] Now Executing
10-14 16:35:43.360 2667-2667/? D/libEGL: eglTerminate EGLDisplay = 0xbea1d43c
10-14 16:35:43.390 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.390 2667-2667/? D/libEGL: eglTerminate EGLDisplay = 0xbea1d43c
10-14 16:35:43.440 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.475 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.525 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.560 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.610 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.640 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.690 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.725 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.775 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.810 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.895 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:43.995 4336-4336/? D/NetworkController: updateCarrierText : ATV VOD
10-14 16:35:44.995 4336-4336/? D/NetworkController: updateCarrierText : ATV VOD
10-14 16:35:45.430 3437-3461/? D/BatteryService: !@BatteryListener : batteryPropertiesChanged!
10-14 16:35:45.430 3437-3461/? D/BatteryService: level:79, scale:100, status:3, health:2, present:true, voltage: 4074, temperature: 233, technology: Li-ion, AC powered:false, USB powered:true, POGO powered:false, Wireless powered:false, icon:17303401, invalid charger:0, maxChargingCurrent:0
10-14 16:35:45.430 3437-3461/? D/BatteryService: online:4, current avg:-18, charge type:2, power sharing:false, high voltage charger:false, capacity:280000, batterySWSelfDischarging:false, current_now:-19
10-14 16:35:45.430 3437-3437/? D/BatteryService: Sending ACTION_BATTERY_CHANGED.
10-14 16:35:45.435 4336-4336/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
10-14 16:35:45.435 4336-4336/? D/KeyguardUpdateMonitor: handleBatteryUpdate
10-14 16:35:45.435 4336-4336/? D/PowerUI: priorPlugType = 2 mPlugType =  2
10-14 16:35:45.465 4336-4336/? D/BatteryMeterView: ACTION_BATTERY_CHANGED : level:79 status:3 health:2
10-14 16:35:45.470 4336-4336/? D/BatteryMeterView: ACTION_BATTERY_CHANGED : level:79 status:3 health:2
10-14 16:35:46.785 3437-6179/? D/SSRM:s: SIOP:: AP = 260, PST = 256 (W:10), LCD = 119
10-14 16:35:46.785 3437-6179/? D/ConnectivityService: returning getNetworkInfo for network type 1 : [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: "ATV VOD", roaming: false, failover: false, isAvailable: true]
10-14 16:35:47.225 2699-26250/? E/wv_dash: Trustlet did not send a valid return code: 0xd
10-14 16:35:47.225 2699-26250/? E/wv_dash: tee_send_msg_general_cmd is failed.
10-14 16:35:47.225 2699-26250/? E/wv_dash: process drm decrypt CTR failed
10-14 16:35:47.225 2699-26250/? E/WVCdm: Decrypt error result in session sid2 during encrypted block: 1
10-14 16:35:47.230 31441-31569/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Renderer error.
                                                                                           com.google.android.exoplayer2.ExoPlaybackException
                                                                                               at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:660)
                                                                                               at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:478)
                                                                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431)
                                                                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:265)
                                                                                               at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                               at android.os.Looper.loop(Looper.java:158)
                                                                                               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: Unknown Error
                                                                                               at android.media.MediaCodec.native_queueSecureInputBuffer(Native Method)
                                                                                               at android.media.MediaCodec.queueSecureInputBuffer(MediaCodec.java:2292)
                                                                                               at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:651)
                                                                                               at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:478) 
                                                                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431) 
                                                                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:265) 
                                                                                               at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                               at android.os.Looper.loop(Looper.java:158) 
                                                                                               at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                                                               at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 
10-14 16:35:47.235 2699-31584/? I/EXYNOS_BASE_COMP: [0xae5d7380][Exynos_OMX_ComponentStateSet] current:(OMX_StateExecuting) dest:(OMX_StateIdle)
10-14 16:35:47.235 31441-31583/com.google.android.exoplayer2.demo I/ACodec: [OMX.Exynos.avc.dec.secure] Now Executing->Idle
10-14 16:35:47.235 2699-31594/? W/libexynosv4l2: failed to ioctl: VIDIOC_DQBUF (22 - Invalid argument)
10-14 16:35:47.235 2699-31593/? W/libexynosv4l2: failed to ioctl: VIDIOC_DQBUF (22 - Invalid argument)
10-14 16:35:47.235 2699-31584/? I/EXYNOS_BASE_COMP: [0xae5d7380][Exynos_OMX_ComponentStateSet]:567 OMX_EventCmdComplete
10-14 16:35:47.235 2699-31584/? I/EXYNOS_BASE_COMP: [0xae5d7380][Exynos_OMX_ComponentStateSet] current:(OMX_StateIdle) dest:(OMX_StateLoaded)
10-14 16:35:47.235 2699-31584/? E/libcsc: csc_deinit:: unsupported csc_hw_type
10-14 16:35:47.240 2699-31584/? I/EXYNOS_BASE_COMP: [0xae5d7380][Exynos_OMX_ComponentStateSet]:567 OMX_EventCmdComplete
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 2667-2802/? D/libEGL: eglTerminate EGLDisplay = 0xb68c1624
10-14 16:35:47.245 31441-31583/com.google.android.exoplayer2.demo D/SurfaceUtils: set up nativeWindow 0xadf66808 for 1x1, color 0x2, rotation 0, usage 0x930
10-14 16:35:47.245 31441-31441/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [17.92]
                                                                                 com.google.android.exoplayer2.ExoPlaybackException
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:660)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:478)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:265)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                     at android.os.Looper.loop(Looper.java:158)
                                                                                     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: Unknown Error
                                                                                     at android.media.MediaCodec.native_queueSecureInputBuffer(Native Method)
                                                                                     at android.media.MediaCodec.queueSecureInputBuffer(MediaCodec.java:2292)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:651)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:478) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:265) 
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                     at android.os.Looper.loop(Looper.java:158) 
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                                                     at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 
10-14 16:35:47.250 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:47.250 2667-2667/? D/libEGL: eglTerminate EGLDisplay = 0xbea1d43c
10-14 16:35:47.255 31441-31583/com.google.android.exoplayer2.demo I/ACodec: [OMX.Exynos.avc.dec.secure] Now Idle->Loaded
10-14 16:35:47.255 31441-31583/com.google.android.exoplayer2.demo I/ACodec: [OMX.Exynos.avc.dec.secure] Now Loaded
10-14 16:35:47.255 31441-31583/com.google.android.exoplayer2.demo I/ACodec: SECURE PLAYBACK STOP / send intent to dvfshelper
10-14 16:35:47.260 31441-31583/com.google.android.exoplayer2.demo I/ACodec:  [OMX.Exynos.avc.dec.secure] Now kWhatShutdownCompleted event : 7031
10-14 16:35:47.260 31441-31582/com.google.android.exoplayer2.demo I/MediaCodec: Codec shutdown complete
10-14 16:35:47.260 3437-6179/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 500000  uid : 1000  pid : 3437  tag : SCREEN_MIRROR_BOOSTER_1_0G@43
10-14 16:35:47.265 31441-31583/com.google.android.exoplayer2.demo I/ACodec:  [OMX.Exynos.avc.dec.secure] Now uninitialized
10-14 16:35:47.265 31441-31583/com.google.android.exoplayer2.demo I/ACodec:  [] Now kWhatShutdownCompleted event : 7031
10-14 16:35:47.265 31441-31582/com.google.android.exoplayer2.demo I/MediaCodec: Codec shutdown complete
10-14 16:35:47.270 31441-31441/com.google.android.exoplayer2.demo D/EventLogger: videoDisabled [17.94]
10-14 16:35:47.270 2667-2667/? D/libexynosgscaler: virtual CGscaler::~CGscaler()
10-14 16:35:47.270 2667-2667/? D/libexynosgscaler: virtual LibMpp::~LibMpp()


                                                   [ 10-14 16:35:47.270  2667: 2667 D/         ]
                                                   virtual MppFactory::~MppFactory()
10-14 16:35:47.270 2667-2667/? D/libEGL: eglInitialize EGLDisplay = 0xbea1d3dc
10-14 16:35:47.270 2667-2667/? D/libEGL: eglTerminate EGLDisplay = 0xbea1d43c

                                         [ 10-14 16:35:47.270  2699:31597 I/         ]
                                         SAACD_COMP_Reset() in
10-14 16:35:47.270 2699-31597/? I/SEC_BASE_COMP: SEC_OMX_ComponentStateSet: Cur(3) -> Dest(2)
10-14 16:35:47.270 31441-31591/com.google.android.exoplayer2.demo I/ACodec: [OMX.SEC.aac.dec] Now Executing->Idle
10-14 16:35:47.275 2699-31597/? I/SEC_BASE_COMP: SEC_OMX_ComponentStateSet: Cur(2) -> Dest(1)
10-14 16:35:47.275 31441-31591/com.google.android.exoplayer2.demo I/ACodec: [OMX.SEC.aac.dec] Now Idle->Loaded
10-14 16:35:47.275 31441-31591/com.google.android.exoplayer2.demo I/ACodec: [OMX.SEC.aac.dec] Now Loaded
10-14 16:35:47.275 31441-31591/com.google.android.exoplayer2.demo I/ACodec:  [OMX.SEC.aac.dec] Now kWhatShutdownCompleted event : 7031
10-14 16:35:47.275 31441-31591/com.google.android.exoplayer2.demo I/MediaCodec: Codec shutdown complete
10-14 16:35:47.280 31441-31591/com.google.android.exoplayer2.demo I/ACodec:  [OMX.SEC.aac.dec] Now uninitialized
10-14 16:35:47.280 31441-31591/com.google.android.exoplayer2.demo I/ACodec:  [] Now kWhatShutdownCompleted event : 7031
10-14 16:35:47.280 31441-31591/com.google.android.exoplayer2.demo I/MediaCodec: Codec shutdown complete
10-14 16:35:47.280 2699-26250/? I/Drm: virtual status_t android::Drm::closeSession(const Vector<uint8_t> &) is called from com.google.android.exoplayer2.demo(pid:31441)
10-14 16:35:47.280 2699-26250/? I/WVCdm: CdmEngine::CloseSession
10-14 16:35:47.305 31441-31441/com.google.android.exoplayer2.demo D/EventLogger: audioDisabled [17.98]
10-14 16:35:47.315 31441-31441/com.google.android.exoplayer2.demo D/EventLogger: state [17.99, true, I]
10-14 16:35:47.425 2699-3430/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 55
10-14 16:35:47.960 5162-28776/? V/NativeCrypto: SSL shutdown failed: ssl=0x8f9cbb00: I/O error during system call, Connection timed out

@ojw28
Copy link
Contributor

ojw28 commented Oct 14, 2016

It seems highly unlikely to me that the failure in the response above is related to this issue. The fix for this issue is only touching provisioning requests and POST requests via DefaultHttpDataSource. Changing these areas shouldn't in any way result in failures in the media decoder.

You can probably verify the issue is unrelated pretty easily by patching the change in and out. I doubt this will reliably toggle the failure on and off. I doubt you'll find going back between tip-of-tree dev-2 and r2.0.2 makes any difference either, since I don't think we've changed anything that would have caused this as a new issue. It would be good if you could check though.

@ojw28
Copy link
Contributor

ojw28 commented Oct 17, 2016

That seems similarly unlikely. There were only 19 commits in 2.0.2 and I can't see any of them affecting this. If this is really true, please can you binary search to the exact commit that broke things (should take <=5 attempts) so that we can take a look and fix whatever the issue is.

There are other important fixes in r2.0.3 (just released). I wouldn't recommend basing anything on earlier revisions of v2.

@mlondon1
Copy link
Author

Sorry - i deleted the comment after i was able to reproduce it in 2.0.1 as well after a few tries. I don't recall seeing the issue before, but I must have missed it - there must be something else going on. I will try 2.0.3.

@ojw28
Copy link
Contributor

ojw28 commented Oct 17, 2016

Thanks. The issue looks like some kind of device specific thing to be honest. I wouldn't be surprised if it reproduces on all ExoPlayer releases (including v1).

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants