Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1642)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc

Issue 2758533002: Fix rtcp_sender to support sdes with 31 chunk (Closed)
Patch Set: extra nit fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 5f2eb759c96937cccb48d44f421e4f8a22a4c534..186f4e980016c18399dd216ce93518c605604c8c 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -327,7 +327,8 @@ int32_t RTCPSender::AddMixedCNAME(uint32_t SSRC, const char* c_name) {
RTC_DCHECK(c_name);
RTC_DCHECK_LT(strlen(c_name), RTCP_CNAME_SIZE);
rtc::CritScope lock(&critical_section_rtcp_sender_);
- if (csrc_cnames_.size() >= kRtpCsrcSize)
+ // One spot is reserved for ssrc_/cname_.
+ if (csrc_cnames_.size() >= rtcp::Sdes::kMaxNumberOfChunks - 1)
nisse-webrtc 2017/03/16 13:42:44 I'd need a bit more context to understand what's g
danilchap 2017/03/16 13:58:02 imagine 30 participant meeting with server-side au
return -1;
csrc_cnames_[SSRC] = c_name;
@@ -463,8 +464,8 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildSDES(
rtcp::Sdes* sdes = new rtcp::Sdes();
sdes->AddCName(ssrc_, cname_);
- for (const auto it : csrc_cnames_)
- sdes->AddCName(it.first, it.second);
+ for (const auto& it : csrc_cnames_)
+ RTC_CHECK(sdes->AddCName(it.first, it.second));
return std::unique_ptr<rtcp::RtcpPacket>(sdes);
}
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698