1
0
Fork 1

null check SurfaceTextureHelper

(cherry picked from commit 29978a0f2a127223260db1b37420bed9b5e97e9a)
This commit is contained in:
Daniel Gultsch 2024-03-04 09:49:03 +01:00 committed by Arne
parent 8770bb446e
commit 34eb7eefa3

View file

@ -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());