copy-red: Fill an rtc::Buffer with bytes the easy way
The easy way also happens to be more efficient if we have to reallocate, but that's a minor concern here. Review URL: https://codereview.webrtc.org/1327053002 Cr-Commit-Position: refs/heads/master@{#9876}
This commit is contained in:
@ -88,8 +88,7 @@ AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeInternal(
|
||||
DCHECK_EQ(info.redundant.size(), 2u);
|
||||
}
|
||||
// Save primary to secondary.
|
||||
secondary_encoded_.SetSize(info.encoded_bytes);
|
||||
memcpy(secondary_encoded_.data(), encoded, info.encoded_bytes);
|
||||
secondary_encoded_.SetData(encoded, info.encoded_bytes);
|
||||
secondary_info_ = info;
|
||||
DCHECK_EQ(info.speech, info.redundant[0].speech);
|
||||
}
|
||||
|
Reference in New Issue
Block a user