Chromium Code Reviews| 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) { |
|
pthatcher1
2015/11/19 17:16:57
This might be more clear as:
bool known_ssrc = (G
the sun
2015/11/19 20:33:22
I tried this, mainly to get rid of the extra map l
pthatcher1
2015/11/19 21:01:22
So you're suggesting:
1. Land the minimal diff t
|
| 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 |