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

Unified Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1404363003: Update receive report SSRCs on RemoveSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoengine2.cc
diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index 3813519b96d1e01632762d26424c8223f5ad399d..90ab3e5c2b4f7e6159a083b7cb8f25ba7a41c33f 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -1146,6 +1146,19 @@ bool WebRtcVideoChannel2::RemoveSendStream(uint32_t ssrc) {
removed_stream = it->second;
send_streams_.erase(it);
+
+ // Switch receiver report SSRCs, the one in use is no longer valid.
+ if (rtcp_receiver_report_ssrc_ == ssrc) {
+ rtcp_receiver_report_ssrc_ = send_streams_.empty()
+ ? kDefaultRtcpReceiverReportSsrc
+ : send_streams_.begin()->first;
+ LOG(LS_INFO) << "SetLocalSsrc on all the receive streams because the "
+ "previous local SSRC was removed.";
+
+ for (auto& kv : receive_streams_) {
+ kv.second->SetLocalSsrc(rtcp_receiver_report_ssrc_);
+ }
+ }
}
delete removed_stream;
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698