Make sure FEC packets aren't passed to the VCM with non-zero length.

BUG=902

Review URL: https://webrtc-codereview.appspot.com/843007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2840 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org
2012-09-28 11:13:08 +00:00
parent 95c2364d2f
commit a30eb31729
2 changed files with 6 additions and 1 deletions

View File

@ -1178,6 +1178,12 @@ VideoCodingModuleImpl::IncomingPacket(const WebRtc_UWord8* incomingPayload,
WebRtc_UWord32 payloadLength, WebRtc_UWord32 payloadLength,
const WebRtcRTPHeader& rtpInfo) const WebRtcRTPHeader& rtpInfo)
{ {
if (incomingPayload == NULL) {
// The jitter buffer doesn't handle non-zero payload lengths for packets
// without payload.
// TODO(holmer): We should fix this in the jitter buffer.
payloadLength = 0;
}
const VCMPacket packet(incomingPayload, payloadLength, rtpInfo); const VCMPacket packet(incomingPayload, payloadLength, rtpInfo);
WebRtc_Word32 ret; WebRtc_Word32 ret;
if (_dualReceiver.State() != kPassive) if (_dualReceiver.State() != kPassive)

View File

@ -137,7 +137,6 @@ WebRtc_Word32 ViEReceiver::OnReceivedPayloadData(
packet_size, packet_size,
TickTime::MillisecondTimestamp(), TickTime::MillisecondTimestamp(),
compensated_timestamp); compensated_timestamp);
if (vcm_->IncomingPacket(payload_data, payload_size, *rtp_header) != 0) { if (vcm_->IncomingPacket(payload_data, payload_size, *rtp_header) != 0) {
// Check this... // Check this...
return -1; return -1;