Chromium Code Reviews| Index: webrtc/voice_engine/transmit_mixer.cc |
| diff --git a/webrtc/voice_engine/transmit_mixer.cc b/webrtc/voice_engine/transmit_mixer.cc |
| index 6796f8457c5e5b3060920c6be9995b8f739612b2..21140ace713f9e4f65bb274c8752ba4c90f4ff3f 100644 |
| --- a/webrtc/voice_engine/transmit_mixer.cc |
| +++ b/webrtc/voice_engine/transmit_mixer.cc |
| @@ -247,9 +247,13 @@ void TransmitMixer::GetSendCodecInfo(int* max_sample_rate, |
| Channel* channel = it.GetChannel(); |
| if (channel->Sending()) { |
| CodecInst codec; |
| - channel->GetSendCodec(codec); |
| - *max_sample_rate = std::max(*max_sample_rate, codec.plfreq); |
| - *max_channels = std::max(*max_channels, codec.channels); |
| + if (channel->GetSendCodec(codec) == 0) { |
|
minyue-webrtc
2017/07/10 09:30:32
I found another usage of this, should that be take
ossu
2017/07/11 10:23:11
We could add a DCHECK there. From what I can see,
|
| + *max_sample_rate = std::max(*max_sample_rate, codec.plfreq); |
| + *max_channels = std::max(*max_channels, codec.channels); |
| + } else { |
| + LOG(LS_WARNING) << "Unable to get send codec for channel " |
|
minyue-webrtc
2017/07/10 09:30:32
If I understand correctly, this is not supposed to
ossu
2017/07/11 10:23:11
NOTREACHED after the logging, I presume? So we'll
|
| + << channel->ChannelId(); |
| + } |
| } |
| } |
| } |