diff --git a/api/source/common.cpp b/api/source/common.cpp index 0b566645..b0c4b02f 100755 --- a/api/source/common.cpp +++ b/api/source/common.cpp @@ -140,10 +140,12 @@ API_EXPORT uint16_t API_CALL mk_rtp_server_start(uint16_t port){ #ifdef ENABLE_RTPPROXY try { //创建rtp tcp服务器 + tcpRtpServer = std::make_shared(); tcpRtpServer->start(port); + + //创建rtp udp服务器 auto ret = tcpRtpServer->getPort(); udpRtpServer = std::make_shared(); - //创建rtp udp服务器 udpRtpServer->initSock(port); return ret; } catch (std::exception &ex) {