More cleanups

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-13 00:34:53 +01:00
parent 8dbd381adb
commit 42b71b9710
2 changed files with 7 additions and 0 deletions

View file

@ -1009,6 +1009,12 @@ public class CallActivity extends AppCompatActivity {
peerConnectionFactory = null;
}
localMediaStream.removeTrack(localAudioTrack);
localMediaStream.removeTrack(localVideoTrack);
localMediaStream = null;
localAudioTrack = null;
localVideoTrack = null;
hangupNetworkCalls();
}
}

View file

@ -99,6 +99,7 @@ public class MagicPeerConnectionWrapper {
}
if (peerConnection != null) {
peerConnection.removeStream(localMediaStream);
peerConnection.close();
peerConnection = null;
}