From 36764836f65bc75b6e5923bd2390e5b5514fb9d1 Mon Sep 17 00:00:00 2001 From: Pierre Lespagnol <pierre.lespagnol@savoirfairelinux.com> Date: Fri, 5 Feb 2021 14:33:06 -0500 Subject: [PATCH] sipcall: move ice destruction in IO pool The ice transport destruction can take a while, move this in the io pool to avoid blocking the main thread. This patch fix the incorrect orientation for android devices after conferences. Change-Id: I7ce467628aa265c2e8afc140d3bb4980beebd2ae --- src/sip/sipcall.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index 005dab6926..6dff89a5bf 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -961,7 +961,8 @@ SIPCall::removeCall() sdp_->setActiveRemoteSdpSession(nullptr); } Call::removeCall(); - mediaTransport_.reset(); + if (mediaTransport_) + dht::ThreadPool::io().run([ice = std::move(mediaTransport_)] {}); tmpMediaTransport_.reset(); inv.reset(); setTransport({}); -- GitLab