Fix issue 211: Make sure we always generate at least one FEC packet per frame if we need protection.
BUG=211 TEST= Review URL: http://webrtc-codereview.appspot.com/348002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1363 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
df55166f07
commit
e21a8cf4d4
@ -175,6 +175,11 @@ ForwardErrorCorrection::GenerateFEC(const ListWrapper& mediaPacketList,
|
|||||||
// Result in Q0 with an unsigned round.
|
// Result in Q0 with an unsigned round.
|
||||||
WebRtc_UWord32 numFecPackets = (numMediaPackets * protectionFactor +
|
WebRtc_UWord32 numFecPackets = (numMediaPackets * protectionFactor +
|
||||||
(1 << 7)) >> 8;
|
(1 << 7)) >> 8;
|
||||||
|
// Generate at least one FEC packet if we need protection.
|
||||||
|
if (protectionFactor > 0 && numFecPackets == 0)
|
||||||
|
{
|
||||||
|
numFecPackets = 1;
|
||||||
|
}
|
||||||
if (numFecPackets == 0)
|
if (numFecPackets == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user