Merge pull request #865 from yapingcat/master

fix bug rtcp sr包的 ssrc 和rtp包中ssrc的不一致
This commit is contained in:
夏楚 2021-05-22 11:04:50 +08:00 committed by GitHub
commit 3b4e7619ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1139,7 +1139,7 @@ void RtspSession::updateRtcpContext(const RtpPacket::Ptr &rtp){
}; };
auto ssrc = rtp->getSSRC(); auto ssrc = rtp->getSSRC();
auto rtcp = _push_src ? rtcp_ctx->createRtcpRR(ssrc + 1, ssrc) : rtcp_ctx->createRtcpSR(ssrc + 1); auto rtcp = _push_src ? rtcp_ctx->createRtcpRR(ssrc + 1, ssrc) : rtcp_ctx->createRtcpSR(ssrc);
auto rtcp_sdes = RtcpSdes::create({SERVER_NAME}); auto rtcp_sdes = RtcpSdes::create({SERVER_NAME});
rtcp_sdes->items.type = (uint8_t)SdesType::RTCP_SDES_CNAME; rtcp_sdes->items.type = (uint8_t)SdesType::RTCP_SDES_CNAME;
rtcp_sdes->items.ssrc = htonl(ssrc); rtcp_sdes->items.ssrc = htonl(ssrc);