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

Unified Diff: webrtc/video/payload_router.cc

Issue 2947633003: Allow parsing empty RTCP TargetBitrate messages, but stop sending them. (Closed)
Patch Set: Add comment about using ToString only in tests Created 3 years, 6 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/video/payload_router_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/payload_router.cc
diff --git a/webrtc/video/payload_router.cc b/webrtc/video/payload_router.cc
index 52e9d46ebb4f594c4fbfa3d96b1753e0717dabdb..3cdfb7503a36a78b14a195582cb559ab0411df35 100644
--- a/webrtc/video/payload_router.cc
+++ b/webrtc/video/payload_router.cc
@@ -156,6 +156,10 @@ void PayloadRouter::OnBitrateAllocationUpdated(
// Simulcast is in use, split the BitrateAllocation into one struct per
// rtp stream, moving over the temporal layer allocation.
for (size_t si = 0; si < rtp_modules_.size(); ++si) {
+ // Don't send empty TargetBitrate messages on streams not being relayed.
+ if (bitrate.GetSpatialLayerSum(si) == 0)
+ break;
+
BitrateAllocation layer_bitrate;
for (int tl = 0; tl < kMaxTemporalStreams; ++tl)
layer_bitrate.SetBitrate(0, tl, bitrate.GetBitrate(si, tl));
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/video/payload_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698