Merge pull request #2575 from pdsouza/pd/fix-exoplayer-codec-error-NPE
[Android] Fix app crash from NPE in Exoplayer error handler
This commit is contained in:
commit
c5c4294127
@ -985,7 +985,8 @@ class ReactExoplayerView extends FrameLayout implements
|
||||
// Special case for decoder initialization failures.
|
||||
MediaCodecRenderer.DecoderInitializationException decoderInitializationException =
|
||||
(MediaCodecRenderer.DecoderInitializationException) cause;
|
||||
if (decoderInitializationException.codecInfo.name == null) {
|
||||
if (decoderInitializationException.codecInfo == null
|
||||
|| decoderInitializationException.codecInfo.name == null) {
|
||||
if (decoderInitializationException.getCause() instanceof MediaCodecUtil.DecoderQueryException) {
|
||||
errorString = getResources().getString(R.string.error_querying_decoders);
|
||||
} else if (decoderInitializationException.secureDecoderRequired) {
|
||||
|
Loading…
Reference in New Issue
Block a user