Prevent sending empty RTCP packet.

Review URL: http://webrtc-codereview.appspot.com/331009

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1277 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pwestin@webrtc.org 2011-12-22 07:40:33 +00:00
parent 4a19030131
commit 8edb39db30

View File

@ -2010,7 +2010,11 @@ RTCPSender::SendRTCP(const WebRtc_UWord32 packetTypeFlags,
}
}
}while (false);
// Sanity don't send empty packets.
if (pos == 0)
{
return -1;
}
return SendToNetwork(rtcpbuffer, (WebRtc_UWord16)pos);
}