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

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

Issue 1427653007: Remove packet initializer in RtpRtcpRtxNackTest. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: potential fix (but wtf) Created 5 years, 1 month 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 | « no previous file | 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/nack_rtx_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index d95c9636d99c2c3bbd6e3df9b77f2246770ccb4f..d2559d6712db34e461a9302e9a853c2a7f41ee52 100644
--- a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -105,10 +105,7 @@ class RtxLoopBackTransport : public webrtc::Transport {
if (ssrc == rtx_ssrc_) count_rtx_ssrc_++;
uint16_t sequence_number = (ptr[2] << 8) + ptr[3];
size_t packet_length = len;
- // TODO(pbos): Figure out why this needs to be initialized. Likely this
- // is hiding a bug either in test setup or other code.
- // https://code.google.com/p/webrtc/issues/detail?id=3183
- uint8_t restored_packet[1500] = {0};
+ uint8_t restored_packet[1500];
RTPHeader header;
rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
if (!parser->Parse(ptr, len, &header)) {
@@ -136,21 +133,19 @@ class RtxLoopBackTransport : public webrtc::Transport {
if (!parser->Parse(restored_packet, packet_length, &header)) {
return false;
}
+ ptr = restored_packet;
} else {
rtp_payload_registry_->SetIncomingPayloadType(header);
}
- const uint8_t* restored_packet_payload =
- restored_packet + header.headerLength;
- packet_length -= header.headerLength;
PayloadUnion payload_specific;
if (!rtp_payload_registry_->GetPayloadSpecifics(header.payloadType,
&payload_specific)) {
return false;
}
- if (!rtp_receiver_->IncomingRtpPacket(header, restored_packet_payload,
- packet_length, payload_specific,
- true)) {
+ if (!rtp_receiver_->IncomingRtpPacket(header, ptr + header.headerLength,
+ packet_length - header.headerLength,
+ payload_specific, true)) {
return false;
}
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698