最近在项目中遇到了视频播放问题,发现部分手机上无法正常播放接入的ExoPlayer三方库。从日志中发现是Decoder初始化失败,具体错误码为4001(ERROR_CODE_DECODER_INIT_FAILED)。尝试在Google上搜索解决方案未果,于是决定深入ExoPlayer源码,一步步查找问题所在。经过一番努力,终于在源码中找到了问题的解决方案,...
面对项目中出现的视频无法播放问题,我们在ExoPlayer三方库中发现了Decoder init failed的常见错误,即4001(ERROR_CODE_DECODER_INIT_FAILED)。在Google搜索未果后,我们决定深入源码以寻找问题根源。最终,通过源码分析,我们找到了问题所在并找到了解决方案,希望能为遇到类似问题的读者提供帮助。对比应用,我...
最近负责的项目中碰到了在部分手机上无法播放视频的问题,我们接入的是 ExoPlayer 三方库,从 log 看出现的是Decoder init failed,也是网上常见的 4001 (ERROR_CODE_DECODER_INIT_FAILED)的问题。 image.png 在Google 搜索无果后,决定深入源码中去一步一步探究,找到问题的所在,果然功夫不负有心人,最终从源码中找到...
02-03 08:33:39.826: E/PlayerActivity(9838): Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.amlogic.avc.decoder.awesome, Format(1/27, null, video/avc, -1, null, [960, 540, -1.0], [-1, -1]) 02-03 08:33:...
com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.hevc, Format(0, null, null, video/hevc, null, -1,...
// failed. Check playbackState and player.getPlaybackError for details. } else { // Paused by app. } } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. (二)、 onPlayerError 可以通过onPlayerError(ExoPlaybackException error)在注册中 实现来接收导致回放失败的错误Player.EventListener。发...
// is buffering, stopped or failed. Check player.getPlayWhenReady, // player.getPlaybackState, player.getPlaybackSuppressionReason and // player.getPlaybackError for details. } } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 播放错误 ...
最近负责的项目中碰到了在部分手机上无法播放视频的问题,我们接入的是 ExoPlayer 三方库,从 log 看出现的是Decoder init failed,也是网上常见的 4001 (ERROR_CODE_DECODER_INIT_FAILED)的问题。 在Google 搜索无果后,决定深入源码中去一步一步探究,找到问题的所在,果然功夫不负有心人,最终从源码中找到了解决方案,...
Fix a bug where skipping into spliced-in chunks triggered an assertion error (#8937). DRM: Keep secure MediaCodec instances initialized when disabling (but not resetting) MediaCodecRenderer. This helps re-use secure decoders in more contexts, which avoids the 'black flash' caused by detaching ...
string.error_instantiating_decoder, decoderInitializationException.decoderName); } } } if (errorString != null) { Log.e(TAG, errorString); } if (isBehindLiveWindow(error)) { clearResumePosition(); preparePlayer(); } else { Log.e("VIDEO FAILED","VIDEO FAILED LOADING...