| 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 a3de360cf6a4a399eb82bbfa5353bf2e83061d2a..ea53524ae1f0ce051bc8619a6914b9aa216d760f 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
|
| @@ -648,16 +648,11 @@ rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBR(
|
|
|
| rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBN(
|
| const RtcpContext& ctx) {
|
| - TMMBRSet* boundingSet = tmmbr_help_.BoundingSetToSend();
|
| - if (boundingSet == nullptr)
|
| - return nullptr;
|
| -
|
| rtcp::Tmmbn* tmmbn = new rtcp::Tmmbn();
|
| tmmbn->From(ssrc_);
|
| - for (uint32_t i = 0; i < boundingSet->lengthOfSet(); i++) {
|
| - if (boundingSet->Tmmbr(i) > 0) {
|
| - tmmbn->WithTmmbr(boundingSet->Ssrc(i), boundingSet->Tmmbr(i),
|
| - boundingSet->PacketOH(i));
|
| + for (const rtcp::TmmbItem& timber : tmmbn_to_send_) {
|
| + if (timber.bitrate_bps() > 0) {
|
| + tmmbn->WithTmmbr(timber);
|
| }
|
| }
|
|
|
| @@ -982,14 +977,14 @@ bool RTCPSender::RtcpXrReceiverReferenceTime() const {
|
| }
|
|
|
| // no callbacks allowed inside this function
|
| -int32_t RTCPSender::SetTMMBN(const TMMBRSet* boundingSet) {
|
| +void RTCPSender::SetTMMBN(const TMMBRSet* bounding_set) {
|
| CriticalSectionScoped lock(critical_section_rtcp_sender_.get());
|
| -
|
| - if (0 == tmmbr_help_.SetTMMBRBoundingSetToSend(boundingSet)) {
|
| - SetFlag(kRtcpTmmbn, true);
|
| - return 0;
|
| + if (!bounding_set) {
|
| + tmmbn_to_send_.clear();
|
| + } else {
|
| + tmmbn_to_send_ = *bounding_set;
|
| }
|
| - return -1;
|
| + SetFlag(kRtcpTmmbn, true);
|
| }
|
|
|
| void RTCPSender::SetFlag(RTCPPacketType type, bool is_volatile) {
|
|
|