diff --git a/src/conference.cpp b/src/conference.cpp index d6ead086a476008ae979e29f8da30b356bc263c4..92cecdfe561f16208e563d5876f649f656b6b6e5 100644 --- a/src/conference.cpp +++ b/src/conference.cpp @@ -394,7 +394,9 @@ Conference::detach() JAMI_INFO("Detach local participant from conference %s", id_.c_str()); if (getState() == State::ACTIVE_ATTACHED) { - Manager::instance().getRingBufferPool().unBindAll(RingBufferPool::DEFAULT_ID); + for (const auto& p : participants_) { + Manager::instance().getRingBufferPool().unBindCallID(getCall(p)->getCallId(), RingBufferPool::DEFAULT_ID); + } #ifdef ENABLE_VIDEO if (auto mixer = getVideoMixer()) { mixer->stopInput(); diff --git a/src/manager.cpp b/src/manager.cpp index f4715ea5efa5b9befec2a5829b9af56b53b14d51..7ce39ed1da5245b9894f7ea576366b32b90a0ae2 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -1244,17 +1244,7 @@ Manager::removeConference(const std::string& conference_id) emitSignal<DRing::CallSignal::ConferenceRemoved>(conference_id); - // We now need to bind the audio to the remain participant - // Unbind main participant audio from conference - getRingBufferPool().unBindAll(RingBufferPool::DEFAULT_ID); - - // bind main participant audio to remaining conference call - ParticipantSet participants(iter->second->getParticipantList()); - auto iter_p = participants.begin(); - if (iter_p != participants.end()) - getRingBufferPool().bindCallID(*iter_p, RingBufferPool::DEFAULT_ID); - - // Then remove the conference from the conference map + // Remove the conference from the conference map pimpl_->conferenceMap_.erase(iter); JAMI_DBG("Conference %s removed successfully", conference_id.c_str()); }