mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
sipcall: do not use invalid pointer on videoRtp
Change-Id: Iccd5fa02855fb8dc33529177e2fb14d7588add44
This commit is contained in:
@ -2147,18 +2147,18 @@ SIPCall::stopAllMedia()
|
||||
audioRtp->stop();
|
||||
#ifdef ENABLE_VIDEO
|
||||
auto const& videoRtp = getVideoRtp();
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(sinksMtx_);
|
||||
auto& videoReceive = videoRtp->getVideoReceive();
|
||||
if (videoReceive) {
|
||||
auto& sink = videoReceive->getSink();
|
||||
for (auto it = callSinksMap_.begin(); it != callSinksMap_.end();) {
|
||||
sink->detach(it->second.get());
|
||||
|
||||
it->second->stop();
|
||||
it = callSinksMap_.erase(it);
|
||||
for (auto it = callSinksMap_.begin(); it != callSinksMap_.end();) {
|
||||
if (videoRtp) {
|
||||
auto& videoReceive = videoRtp->getVideoReceive();
|
||||
if (videoReceive) {
|
||||
auto& sink = videoReceive->getSink();
|
||||
sink->detach(it->second.get());
|
||||
}
|
||||
}
|
||||
it->second->stop();
|
||||
it = callSinksMap_.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user