mirror of
https://github.com/samsonjs/media.git
synced 2026-03-31 10:25:48 +00:00
Don't use TextureView's SurfaceTexture unless available
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=164434943
This commit is contained in:
parent
df05195f5f
commit
15bcdf3b71
1 changed files with 2 additions and 1 deletions
|
|
@ -276,7 +276,8 @@ public class SimpleExoPlayer implements ExoPlayer {
|
|||
Log.w(TAG, "Replacing existing SurfaceTextureListener.");
|
||||
}
|
||||
textureView.setSurfaceTextureListener(componentListener);
|
||||
SurfaceTexture surfaceTexture = textureView.getSurfaceTexture();
|
||||
SurfaceTexture surfaceTexture = textureView.isAvailable() ? textureView.getSurfaceTexture()
|
||||
: null;
|
||||
setVideoSurfaceInternal(surfaceTexture == null ? null : new Surface(surfaceTexture), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue