multiplex: fixed some issues, this commit passes tests excluding double bind
This commit is contained in:
parent
94f6559b17
commit
0267a2ccf9
|
@ -54,12 +54,15 @@ uvgrtp::media_stream::media_stream(std::string cname, std::string remote_addr,
|
|||
zrtp_handler_key_(0),
|
||||
reception_flow_(nullptr),
|
||||
media_(nullptr),
|
||||
holepuncher_(std::unique_ptr<uvgrtp::holepuncher>(new uvgrtp::holepuncher(socket_))),
|
||||
holepuncher_(nullptr),
|
||||
cname_(cname),
|
||||
fps_numerator_(30),
|
||||
fps_denominator_(1),
|
||||
ssrc_(std::make_shared<std::atomic<std::uint32_t>>(uvgrtp::random::generate_32()))
|
||||
{}
|
||||
{
|
||||
socket_ = sfp_->create_new_socket();
|
||||
holepuncher_ = std::unique_ptr<uvgrtp::holepuncher>(new uvgrtp::holepuncher(socket_));
|
||||
}
|
||||
|
||||
uvgrtp::media_stream::~media_stream()
|
||||
{
|
||||
|
@ -86,8 +89,6 @@ rtp_error_t uvgrtp::media_stream::init_connection()
|
|||
|
||||
ipv6_ = sfp_->get_ipv6();
|
||||
|
||||
socket_ = sfp_->create_new_socket();
|
||||
|
||||
if (!(rce_flags_ & RCE_RECEIVE_ONLY) && remote_address_ != "" && dst_port_ != 0)
|
||||
{
|
||||
// no reason to fail sending even if binding fails so we set remote address first
|
||||
|
|
|
@ -16,7 +16,9 @@ uvgrtp::session::session(std::string cname, std::string addr, std::shared_ptr<uv
|
|||
local_address_(""),
|
||||
cname_(cname),
|
||||
sf_(sfp)
|
||||
{}
|
||||
{
|
||||
sf_->set_local_interface(generic_address_);
|
||||
}
|
||||
|
||||
uvgrtp::session::session(std::string cname, std::string remote_addr, std::string local_addr, std::shared_ptr<uvgrtp::socketfactory> sfp):
|
||||
#ifdef __RTP_CRYPTO__
|
||||
|
@ -43,7 +45,6 @@ uvgrtp::media_stream* uvgrtp::session::create_stream(uint16_t port, rtp_format_t
|
|||
{
|
||||
if (rce_flags & RCE_RECEIVE_ONLY)
|
||||
{
|
||||
sf_->set_local_interface(generic_address_);
|
||||
return create_stream(port, 0, fmt, rce_flags);
|
||||
}
|
||||
else if (rce_flags & RCE_SEND_ONLY)
|
||||
|
|
Loading…
Reference in New Issue