diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index cabc41d2f..095ca3278 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -566,6 +566,7 @@ public class CallActivity extends AppCompatActivity { videoCapturer.dispose(); } + if (localMediaStream.videoTracks.size() > 0) { localMediaStream.removeTrack(localMediaStream.videoTracks.get(0)); } @@ -573,8 +574,14 @@ public class CallActivity extends AppCompatActivity { if (localMediaStream.audioTracks.size() > 0) { localMediaStream.removeTrack(localMediaStream.audioTracks.get(0)); } + localVideoTrack = null; + localAudioTrack = null; + localRenderer = null; localMediaStream = null; + videoCapturer.dispose(); + videoCapturer = null; + pipVideoView.release(); String credentials = ApiHelper.getCredentials(userEntity.getUsername(), userEntity.getToken());