diff --git a/src/modules/rtp_rtcp/source/forward_error_correction.cc b/src/modules/rtp_rtcp/source/forward_error_correction.cc index 4ca662b6b..3e0d4e34d 100644 --- a/src/modules/rtp_rtcp/source/forward_error_correction.cc +++ b/src/modules/rtp_rtcp/source/forward_error_correction.cc @@ -175,6 +175,11 @@ ForwardErrorCorrection::GenerateFEC(const ListWrapper& mediaPacketList, // Result in Q0 with an unsigned round. WebRtc_UWord32 numFecPackets = (numMediaPackets * protectionFactor + (1 << 7)) >> 8; + // Generate at least one FEC packet if we need protection. + if (protectionFactor > 0 && numFecPackets == 0) + { + numFecPackets = 1; + } if (numFecPackets == 0) { return 0;