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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_packet.cc

Issue 2217383002: Use RtpPacketToSend in RtpSenderVideo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 3 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
Index: webrtc/modules/rtp_rtcp/source/rtp_packet.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtp_packet.cc
index 283512cd8fa51e7d7dc74da62f5cc116f9051ad3..d089560e68cf25d59b6b14a6e22a0d6369588da0 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet.cc
@@ -274,6 +274,7 @@ uint8_t* Packet::AllocatePayload(size_t size_bytes) {
LOG(LS_WARNING) << "Cannot set payload, not enough space in buffer.";
return nullptr;
}
+ buffer_.SetSize(payload_offset_); // Reset payload size to avoid copying it.
sprang_webrtc 2016/09/27 10:45:00 I'm not sure I follow this. How does doing this Se
danilchap 2016/09/27 11:47:05 comment expanded. this optimization was added to R
payload_size_ = size_bytes;
buffer_.SetSize(payload_offset_ + payload_size_);
return WriteAt(payload_offset_);
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698