Compare commits

..

2 Commits

Author SHA1 Message Date
cqm
af6d265018 change getSSRC 2024-10-31 21:55:39 +08:00
cqm
eb8e39d897 use ref callback 2024-10-31 21:39:28 +08:00
2 changed files with 5 additions and 3 deletions

View File

@ -346,7 +346,7 @@ public:
return it->second;
}
void for_each(std::function<void(const std::string&, const Pointer&)> cb) {
void for_each(const std::function<void(const std::string&, const Pointer&)>& cb) {
std::lock_guard<std::recursive_mutex> lck(_mtx);
auto it = _map.begin();
while (it != _map.end()) {

View File

@ -296,10 +296,12 @@ void RtpServer::updateSSRC(uint32_t ssrc) {
}
uint32_t RtpServer::getSSRC() const {
if (_ssrc)
if (_ssrc) {
return *_ssrc;
else if (_tcp_server)
}
if (_tcp_server) {
return (*_tcp_server)[RtpSession::kSSRC];
}
return 0;
}