|
@@ -651,20 +651,23 @@ public class CallActivity extends AppCompatActivity {
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (localMediaStream.videoTracks.size() > 0) {
|
|
|
+ if (localMediaStream.videoTracks != null && localMediaStream.videoTracks.size() > 0) {
|
|
|
localMediaStream.removeTrack(localMediaStream.videoTracks.get(0));
|
|
|
}
|
|
|
|
|
|
- if (localMediaStream.audioTracks.size() > 0) {
|
|
|
+ if (localMediaStream.audioTracks != null && localMediaStream.audioTracks.size() > 0) {
|
|
|
localMediaStream.removeTrack(localMediaStream.audioTracks.get(0));
|
|
|
}
|
|
|
+
|
|
|
localVideoTrack = null;
|
|
|
localAudioTrack = null;
|
|
|
localRenderer = null;
|
|
|
localMediaStream = null;
|
|
|
|
|
|
- videoCapturer.dispose();
|
|
|
- videoCapturer = null;
|
|
|
+ if (videoCapturer != null) {
|
|
|
+ videoCapturer.dispose();
|
|
|
+ videoCapturer = null;
|
|
|
+ }
|
|
|
|
|
|
pipVideoView.release();
|
|
|
|