From 54ca3fb02022879bf98a17ebd64d1b75ea2bb7a0 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 29 Apr 2020 09:22:49 +0200 Subject: [PATCH] release video after end card reached. fixes video call retry --- .../java/eu/siacs/conversations/ui/RtpSessionActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java index 2cdba2d0c..335063b2c 100644 --- a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java @@ -645,7 +645,9 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe private void updateVideoViews(final RtpEndUserState state) { if (END_CARD.contains(state) || state == RtpEndUserState.ENDING_CALL) { binding.localVideo.setVisibility(View.GONE); + binding.localVideo.release(); binding.remoteVideo.setVisibility(View.GONE); + binding.remoteVideo.release(); binding.pipLocalMicOffIndicator.setVisibility(View.GONE); if (isPictureInPicture()) { binding.appBarLayout.setVisibility(View.GONE); @@ -811,7 +813,9 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe updateProfilePicture(state, contact); }); if (END_CARD.contains(state)) { - resetIntent(account, with, state, requireRtpConnection().getMedia()); + final JingleRtpConnection rtpConnection = requireRtpConnection(); + resetIntent(account, with, state, rtpConnection.getMedia()); + releaseVideoTracks(rtpConnection); this.rtpConnectionReference = null; } } else {