multiplex: fix small error in startup

This commit is contained in:
Heikki Tampio 2023-04-19 10:13:13 +03:00
parent 04cd2a2422
commit 0298c9e9a9
2 changed files with 3 additions and 2 deletions

View File

@ -97,16 +97,17 @@ rtp_error_t uvgrtp::media_stream::init_connection()
if (src_port_ != 0 && !sfp_->is_port_in_use(src_port_)) {
socket_ = sfp_->create_new_socket();
sfp_->start(socket_, 0);
}
else {
if (sfp_->get_socket_ptr() == nullptr) {
socket_ = sfp_->create_new_socket();
sfp_->start(socket_, 0);
}
else {
socket_ = sfp_->get_socket_ptr();
}
}
sfp_->start(socket_, 0);
holepuncher_ = std::unique_ptr<uvgrtp::holepuncher>(new uvgrtp::holepuncher(socket_));

View File

@ -201,7 +201,7 @@ rtp_error_t uvgrtp::socketfactory::install_receive_hook(
if (!hook) {
return RTP_INVALID_VALUE;
}
// tämä ssrc on sitten se meidän eli vastaanottajan pään media streamin ssrc
if(hooks_.count(ssrc) == 0) {
receive_pkt_hook new_hook = { arg, hook };
hooks_[ssrc] = new_hook;