Enable NACK for audio even if there are no send streams.

BUG=webrtc:5762

Review-Url: https://codereview.webrtc.org/1950963003
Cr-Commit-Position: refs/heads/master@{#12641}
This commit is contained in:
deadbeef 2016-05-06 04:57:03 -07:00 committed by Commit bot
parent 31fec40482
commit b56069e650
2 changed files with 4 additions and 5 deletions

View File

@ -1676,10 +1676,8 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
}
// Set nack status on receive channels.
if (!send_streams_.empty()) {
for (const auto& kv : recv_streams_) {
SetNack(kv.second->channel(), send_codec_spec_.nack_enabled);
}
for (const auto& kv : recv_streams_) {
SetNack(kv.second->channel(), send_codec_spec_.nack_enabled);
}
// Check if the transport cc feedback has changed on the preferred send codec,

View File

@ -1351,7 +1351,8 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackAsCallee) {
cricket::kParamValueEmpty));
EXPECT_FALSE(voe_.GetNACK(channel_num));
EXPECT_TRUE(channel_->SetSendParameters(parameters));
EXPECT_FALSE(voe_.GetNACK(channel_num));
// NACK should be enabled even with no send stream.
EXPECT_TRUE(voe_.GetNACK(channel_num));
EXPECT_TRUE(channel_->AddSendStream(
cricket::StreamParams::CreateLegacy(kSsrc1)));