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

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

Issue 2871173008: Fix packetization logic to leave space for extensions in the last packet (Closed)
Patch Set: Implemented danilchap@ comments Created 3 years, 7 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_format.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format.cc b/webrtc/modules/rtp_rtcp/source/rtp_format.cc
index 753fc2ec41795684f1b7d709416ed0ad1e94a931..47ecfb6177bb0f880ff12e384be451d029deb7b4 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format.cc
@@ -20,21 +20,25 @@
namespace webrtc {
RtpPacketizer* RtpPacketizer::Create(RtpVideoCodecTypes type,
size_t max_payload_len,
+ size_t last_packet_reduction_len,
const RTPVideoTypeHeader* rtp_type_header,
FrameType frame_type) {
switch (type) {
case kRtpVideoH264:
RTC_CHECK(rtp_type_header);
- return new RtpPacketizerH264(max_payload_len,
+ return new RtpPacketizerH264(max_payload_len, last_packet_reduction_len,
rtp_type_header->H264.packetization_mode);
case kRtpVideoVp8:
RTC_CHECK(rtp_type_header);
- return new RtpPacketizerVp8(rtp_type_header->VP8, max_payload_len);
+ return new RtpPacketizerVp8(rtp_type_header->VP8, max_payload_len,
+ last_packet_reduction_len);
case kRtpVideoVp9:
RTC_CHECK(rtp_type_header);
- return new RtpPacketizerVp9(rtp_type_header->VP9, max_payload_len);
+ return new RtpPacketizerVp9(rtp_type_header->VP9, max_payload_len,
+ last_packet_reduction_len);
case kRtpVideoGeneric:
- return new RtpPacketizerGeneric(frame_type, max_payload_len);
+ return new RtpPacketizerGeneric(frame_type, max_payload_len,
+ last_packet_reduction_len);
case kRtpVideoNone:
RTC_NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698