修复GB28181推流显示设备端口错误的问题:#1160

This commit is contained in:
ziyue 2021-10-16 17:31:53 +08:00
parent cfd5957c25
commit 74aa2ba07f

View File

@ -125,8 +125,8 @@ void RtpServer::start(uint16_t local_port, const string &stream_id, bool enable
RtcpHelper::Ptr helper = std::make_shared<RtcpHelper>(std::move(rtcp_socket), 90000); RtcpHelper::Ptr helper = std::make_shared<RtcpHelper>(std::move(rtcp_socket), 90000);
helper->startRtcp(); helper->startRtcp();
rtp_socket->setOnRead([rtp_socket, process, helper](const Buffer::Ptr &buf, struct sockaddr *addr, int addr_len) { rtp_socket->setOnRead([rtp_socket, process, helper](const Buffer::Ptr &buf, struct sockaddr *addr, int addr_len) {
helper->onRecvRtp(buf, addr, addr_len);
process->inputRtp(true, rtp_socket, buf->data(), buf->size(), addr); process->inputRtp(true, rtp_socket, buf->data(), buf->size(), addr);
helper->onRecvRtp(buf, addr, addr_len);
}); });
} else { } else {
#if 1 #if 1