multiplex: Fix bug with initializing holepuncher
This commit is contained in:
parent
44484f14d8
commit
73d09887e8
|
@ -135,9 +135,9 @@ rtp_error_t uvgrtp::media_stream::init_connection()
|
|||
}
|
||||
}
|
||||
|
||||
holepuncher_ = std::unique_ptr<uvgrtp::holepuncher>(new uvgrtp::holepuncher(socket_));
|
||||
|
||||
if (!(rce_flags_ & RCE_RECEIVE_ONLY) && remote_address_ != "" && dst_port_ != 0)
|
||||
//if (!(rce_flags_ & RCE_RECEIVE_ONLY) && remote_address_ != "" && dst_port_ != 0)
|
||||
if (remote_address_ != "" && dst_port_ != 0)
|
||||
{
|
||||
// no reason to fail sending even if binding fails so we set remote address first
|
||||
if (ipv6_) {
|
||||
|
@ -146,10 +146,10 @@ rtp_error_t uvgrtp::media_stream::init_connection()
|
|||
else {
|
||||
remote_sockaddr_ = uvgrtp::socket::create_sockaddr(AF_INET, remote_address_, dst_port_);
|
||||
}
|
||||
holepuncher_ = std::unique_ptr<uvgrtp::holepuncher>(new uvgrtp::holepuncher(socket_));
|
||||
holepuncher_->set_remote_address(remote_sockaddr_, remote_sockaddr_ip6_);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rce_flags_ & RCE_RECEIVE_ONLY) {
|
||||
UVG_LOG_INFO("Sending disabled for this stream");
|
||||
}
|
||||
|
||||
|
|
|
@ -580,6 +580,9 @@ void uvgrtp::reception_flow::process_packet(int rce_flags)
|
|||
|
||||
uint32_t current_ssrc = handler_mapping_[handler.first].get()->load();
|
||||
bool found = false;
|
||||
// this looks so weird because the ssrc field in RTP packets is in different byte order
|
||||
// than in SRTP packets, so we have to check many different possibilities
|
||||
// TODO: fix the byte order...
|
||||
if (current_ssrc == hnssrc || current_ssrc == nhssrc|| current_ssrc == frame->header.ssrc) {
|
||||
found = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue