Index: talk/app/webrtc/webrtcsession.cc |
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc |
index 9102e78eeac9affa903fc5c5f8c148c3d6f231c7..a19fca7b3c1b119ae31bdb47de01f35b3c734fab 100644 |
--- a/talk/app/webrtc/webrtcsession.cc |
+++ b/talk/app/webrtc/webrtcsession.cc |
@@ -1172,15 +1172,12 @@ void WebRtcSession::SetAudioSend(uint32 ssrc, bool enable, |
LOG(LS_ERROR) << "SetAudioSend: ssrc is incorrect: " << ssrc; |
return; |
} |
- if (!voice_channel_->MuteStream(ssrc, !enable)) { |
+ if (!voice_channel_->MuteStream(ssrc, !enable, &options)) { |
pthatcher1
2015/09/04 23:21:16
I like this. We should take in one step further r
the sun
2015/09/08 11:31:12
I decided to take it even further and collapse Set
|
// Allow that MuteStream fail if |enable| is false but assert otherwise. |
// This in the normal case when the underlying media channel has already |
// been deleted. |
ASSERT(enable == false); |
- return; |
} |
- if (enable) |
- voice_channel_->SetChannelOptions(options); |
} |
void WebRtcSession::SetAudioPlayoutVolume(uint32 ssrc, double volume) { |
@@ -1238,15 +1235,12 @@ void WebRtcSession::SetVideoSend(uint32 ssrc, bool enable, |
LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; |
return; |
} |
- if (!video_channel_->MuteStream(ssrc, !enable)) { |
+ if (!video_channel_->MuteStream(ssrc, !enable, options)) { |
// Allow that MuteStream fail if |enable| is false but assert otherwise. |
// This in the normal case when the underlying media channel has already |
// been deleted. |
ASSERT(enable == false); |
- return; |
} |
- if (enable && options) |
- video_channel_->SetChannelOptions(*options); |
} |
bool WebRtcSession::CanInsertDtmf(const std::string& track_id) { |