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

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

Issue 1455923003: Allow default audio receive channel to receive on any unsignalled SSRC. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index c13b22933a323f99eba553d5b84229cf992417b3..d124305cd092f04306e8d6b7b36725f8b81dbe15 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -2445,8 +2445,9 @@ void WebRtcVoiceMediaChannel::OnPacketReceived(
return;
}
- if (receive_channels_.empty()) {
- // Create new channel, which will be the default receive channel.
+ // If we don't have a default channel, and the SSRC is unknown, create a
+ // default channel.
+ if (default_recv_ssrc_ == -1 && GetReceiveChannelId(ssrc) == -1) {
StreamParams sp;
sp.ssrcs.push_back(ssrc);
LOG(LS_INFO) << "Creating default receive stream for SSRC=" << ssrc << ".";
@@ -2466,7 +2467,13 @@ void WebRtcVoiceMediaChannel::OnPacketReceived(
reinterpret_cast<const uint8_t*>(packet->data()), packet->size(),
webrtc_packet_time);
if (webrtc::PacketReceiver::DELIVERY_OK != delivery_result) {
- return;
+ // If the SSRC is unknown here, route it to the default channel, if we have
+ // one. See: https://bugs.chromium.org/p/webrtc/issues/detail?id=5208
+ if (default_recv_ssrc_ == -1) {
+ return;
+ } else {
+ ssrc = default_recv_ssrc_;
+ }
}
// Find the channel to send this packet to. It must exist since webrtc::Call
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698