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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 1406123011: Let AudioCodingModule::SendCodec return Maybe<CodecInst> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 | « webrtc/modules/audio_coding/main/test/iSACTest.cc ('k') | no next file » | 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 65cf7a691005cdf046741c694b45fd5462df3467..98c130fee196757f98366683f6ad566345cac629 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -1242,7 +1242,10 @@ Channel::DeRegisterVoiceEngineObserver()
int32_t
Channel::GetSendCodec(CodecInst& codec)
{
- return (audio_coding_->SendCodec(&codec));
+ auto send_codec = audio_coding_->SendCodec();
+ if (send_codec)
+ codec = *send_codec;
the sun 2015/11/03 10:13:42 nit: less indent + braxies
kwiberg-webrtc 2015/11/03 12:23:53 I was trying to keep with the style of the rest of
the sun 2015/11/03 12:38:21 just fix the indent, but this function would read
kwiberg-webrtc 2015/11/03 13:08:19 Done.
+ return send_codec ? 0 : -1;
}
int32_t
« no previous file with comments | « webrtc/modules/audio_coding/main/test/iSACTest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698