WebRtcVoiceCodecs: Eliminate some useless copying
Review-Url: https://codereview.webrtc.org/2067453002 Cr-Commit-Position: refs/heads/master@{#13151}
This commit is contained in:
parent
111744e1d7
commit
edaa849013
@ -395,12 +395,10 @@ class WebRtcVoiceCodecs final {
|
||||
// Be sure to use the payload type requested by the remote side.
|
||||
// Ignore codecs we don't know about. The negotiation step should prevent
|
||||
// this, but double-check to be sure.
|
||||
webrtc::CodecInst voe_codec = {0};
|
||||
if (!ToCodecInst(codec, &voe_codec)) {
|
||||
if (!ToCodecInst(codec, out)) {
|
||||
LOG(LS_WARNING) << "Unknown codec " << ToString(codec);
|
||||
continue;
|
||||
}
|
||||
*out = voe_codec;
|
||||
return &codec;
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user