Fixes a crash in fullstack tests introduced with r5209.
TBR=mflodman@webrtc.org BUG=1812 Review URL: https://webrtc-codereview.appspot.com/4689005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5211 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
b477fa6d21
commit
79b63206b9
@ -254,12 +254,10 @@ bool RTPPacketHistory::GetPacketAndSetSendTime(uint16_t sequence_number,
|
||||
((now - stored_send_times_.at(index)) < min_elapsed_time_ms)) {
|
||||
WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, -1,
|
||||
"Skip getting packet %u, packet recently resent.", sequence_number);
|
||||
*packet_length = 0;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (length == 0 ||
|
||||
(retransmit && stored_types_.at(index) == kDontRetransmit)) {
|
||||
if (retransmit && stored_types_.at(index) == kDontRetransmit) {
|
||||
// No bytes copied since this packet shouldn't be retransmitted or is
|
||||
// of zero size.
|
||||
return false;
|
||||
|
@ -249,8 +249,7 @@ TEST_F(RtpPacketHistoryTest, MinResendTime) {
|
||||
|
||||
// Time has not elapsed. Packet should be found, but no bytes copied.
|
||||
len = kMaxPacketLength;
|
||||
EXPECT_TRUE(hist_->GetPacketAndSetSendTime(kSeqNum, 101, false, packet_, &len,
|
||||
&time));
|
||||
EXPECT_EQ(0, len);
|
||||
EXPECT_FALSE(hist_->GetPacketAndSetSendTime(kSeqNum, 101, false, packet_,
|
||||
&len, &time));
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
@ -560,7 +560,12 @@ int32_t RTPSender::ReSendPacket(uint16_t packet_id, uint32_t min_resend_time) {
|
||||
|
||||
ModuleRTPUtility::RTPHeaderParser rtp_parser(data_buffer, length);
|
||||
RTPHeader header;
|
||||
rtp_parser.Parse(header);
|
||||
if (!rtp_parser.Parse(header)) {
|
||||
assert(false);
|
||||
WEBRTC_TRACE(kTraceError, kTraceRtpRtcp, id_,
|
||||
"Failed to parse RTP header of packet to be retransmitted.");
|
||||
return -1;
|
||||
}
|
||||
TRACE_EVENT_INSTANT2("webrtc_rtp", "RTPSender::ReSendPacket",
|
||||
"timestamp", header.timestamp,
|
||||
"seqnum", header.sequenceNumber);
|
||||
|
Loading…
x
Reference in New Issue
Block a user