diff --git a/src/Rtp/RtpSender.cpp b/src/Rtp/RtpSender.cpp index a102d5e2..172c9f2e 100644 --- a/src/Rtp/RtpSender.cpp +++ b/src/Rtp/RtpSender.cpp @@ -140,7 +140,7 @@ void RtpSender::startSend(const MediaSourceEvent::SendRtpArgs &args, const funct cb(0, SockException(Err_other, ex.what())); return; } - strong_self->_socket_rtp->bindPeerAddr((struct sockaddr *)&addr); + strong_self->_socket_rtp->bindPeerAddr((struct sockaddr *)&addr, 0, true); strong_self->onConnect(); cb(strong_self->_socket_rtp->get_local_port(), SockException()); }); @@ -182,7 +182,7 @@ void RtpSender::createRtcpSocket() { case AF_INET6: ((sockaddr_in6 *)&addr)->sin6_port = htons(ntohs(((sockaddr_in6 *)&addr)->sin6_port) + 1); break; default: assert(0); break; } - _socket_rtcp->bindPeerAddr((struct sockaddr *)&addr); + _socket_rtcp->bindPeerAddr((struct sockaddr *)&addr, 0, true); _rtcp_context = std::make_shared(); weak_ptr weak_self = shared_from_this(); @@ -349,4 +349,4 @@ void RtpSender::setOnClose(std::function } }//namespace mediakit -#endif// defined(ENABLE_RTPPROXY) \ No newline at end of file +#endif// defined(ENABLE_RTPPROXY)