null check SurfaceTextureHelper
(cherry picked from commit 29978a0f2a127223260db1b37420bed9b5e97e9a)
This commit is contained in:
parent
8770bb446e
commit
34eb7eefa3
1 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,9 @@ class VideoSourceWrapper {
|
|||
final EglBase.Context eglBaseContext) {
|
||||
final SurfaceTextureHelper surfaceTextureHelper =
|
||||
SurfaceTextureHelper.create("webrtc", eglBaseContext);
|
||||
if (surfaceTextureHelper == null) {
|
||||
throw new IllegalStateException("Could not create SurfaceTextureHelper");
|
||||
}
|
||||
this.videoSource = peerConnectionFactory.createVideoSource(false);
|
||||
this.cameraVideoCapturer.initialize(
|
||||
surfaceTextureHelper, context, this.videoSource.getCapturerObserver());
|
||||
|
|
Loading…
Add table
Reference in a new issue