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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 2973083002: TransmitMixer: Check GetSendCodec return value. (Closed)
Patch Set: Add DCHECKs on the result of GetSendCodec. Created 3 years, 5 months 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 | webrtc/voice_engine/transmit_mixer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index 16122709c31fe976ddde3c63a477d78957f72070..4df8e67239342419447b900e9ace36b370090320 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -2759,7 +2759,8 @@ void Channel::ProcessAndEncodeAudio(const int16_t* audio_data,
return;
}
CodecInst codec;
- GetSendCodec(codec);
+ const int result = GetSendCodec(codec);
minyue-webrtc 2017/07/11 11:18:09 will this be safe enough in release build?
ossu 2017/07/11 12:15:10 Not sure. Added a fallback route in case this retu
+ RTC_DCHECK_EQ(result, 0);
std::unique_ptr<AudioFrame> audio_frame(new AudioFrame());
audio_frame->id_ = ChannelId();
audio_frame->sample_rate_hz_ = std::min(codec.plfreq, sample_rate);
« no previous file with comments | « no previous file | webrtc/voice_engine/transmit_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698