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

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

Issue 2522553002: RtpPacketizer::NextPacket fills RtpPacket instead of payload. (Closed)
Patch Set: Named kTheMagicSix Created 4 years 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/rtp_rtcp/source/rtp_format_vp9_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
index 22bf1079d0e453e102bcfdebf4a6cf3106e5bbde..490bfbae4a7aca2bc3698ca86afe9cc46b1cf142 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -362,15 +362,11 @@ bool RTPSenderVideo::SendVideo(RtpVideoCodecTypes video_type,
bool last = false;
while (!last) {
std::unique_ptr<RtpPacketToSend> packet(new RtpPacketToSend(*rtp_header));
- uint8_t* payload = packet->AllocatePayload(max_data_payload_length);
- RTC_DCHECK(payload);
- size_t payload_bytes_in_packet = 0;
- if (!packetizer->NextPacket(payload, &payload_bytes_in_packet, &last))
+ if (!packetizer->NextPacket(packet.get(), &last))
return false;
+ RTC_DCHECK_LE(packet->payload_size(), max_data_payload_length);
- packet->SetPayloadSize(payload_bytes_in_packet);
- packet->SetMarker(last);
if (!rtp_sender_->AssignSequenceNumber(packet.get()))
return false;
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698