Bugfix for NACK behavior. Current code sends a number of duplicate NACK requests.
Landing of 573005 On behalf of an1kumar@gmail.com TBR=mflodman Review URL: https://webrtc-codereview.appspot.com/1002008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3322 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f556890844
commit
1b6da28047
1
AUTHORS
1
AUTHORS
@ -7,3 +7,4 @@ Ben Strong <bstrong@gmail.com>
|
|||||||
Petar Jovanovic <petarj@mips.com>
|
Petar Jovanovic <petarj@mips.com>
|
||||||
Martin Storsjo <martin@martin.st>
|
Martin Storsjo <martin@martin.st>
|
||||||
Jie Mao <maojie0924@gmail.com>
|
Jie Mao <maojie0924@gmail.com>
|
||||||
|
Anil Kumar <an1kumar@gmail.com>
|
||||||
|
@ -1495,6 +1495,8 @@ WebRtc_Word32 ModuleRtpRtcpImpl::SendNACK(const WebRtc_UWord16* nackList,
|
|||||||
}
|
}
|
||||||
const WebRtc_Word64 now = _clock.GetTimeInMS();
|
const WebRtc_Word64 now = _clock.GetTimeInMS();
|
||||||
const WebRtc_Word64 timeLimit = now - waitTime;
|
const WebRtc_Word64 timeLimit = now - waitTime;
|
||||||
|
WebRtc_UWord16 nackLength = size;
|
||||||
|
WebRtc_UWord16 startId = 0;
|
||||||
|
|
||||||
if (_nackLastTimeSent < timeLimit) {
|
if (_nackLastTimeSent < timeLimit) {
|
||||||
// send list
|
// send list
|
||||||
@ -1504,7 +1506,17 @@ WebRtc_Word32 ModuleRtpRtcpImpl::SendNACK(const WebRtc_UWord16* nackList,
|
|||||||
// last seq num is the same don't send list
|
// last seq num is the same don't send list
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
// send list
|
//
|
||||||
|
// send NACK's only for new sequence numbers to avoid re-sending
|
||||||
|
// of NACK's for sequences we have already sent
|
||||||
|
//
|
||||||
|
for (int i = 0; i < size; i++) {
|
||||||
|
if (_nackLastSeqNumberSent == nackList[i]) {
|
||||||
|
startId = i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nackLength = size-startId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_nackLastTimeSent = now;
|
_nackLastTimeSent = now;
|
||||||
@ -1512,7 +1524,7 @@ WebRtc_Word32 ModuleRtpRtcpImpl::SendNACK(const WebRtc_UWord16* nackList,
|
|||||||
|
|
||||||
switch (_nackMethod) {
|
switch (_nackMethod) {
|
||||||
case kNackRtcp:
|
case kNackRtcp:
|
||||||
return _rtcpSender.SendRTCP(kRtcpNack, size, nackList);
|
return _rtcpSender.SendRTCP(kRtcpNack, nackLength, &nackList[startId]);
|
||||||
case kNackOff:
|
case kNackOff:
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user