| Index: webrtc/modules/rtp_rtcp/source/producer_fec.cc
|
| diff --git a/webrtc/modules/rtp_rtcp/source/producer_fec.cc b/webrtc/modules/rtp_rtcp/source/producer_fec.cc
|
| index f96437698ba4d4085d85fd5656b131105466bee6..b84150ec8a576db6d101735671498c3f464e1102 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/producer_fec.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/producer_fec.cc
|
| @@ -97,7 +97,10 @@ size_t RedPacket::length() const {
|
| }
|
|
|
| ProducerFec::ProducerFec()
|
| - : fec_(ForwardErrorCorrection::CreateUlpfec()),
|
| + : ProducerFec(ForwardErrorCorrection::CreateUlpfec()) {}
|
| +
|
| +ProducerFec::ProducerFec(std::unique_ptr<ForwardErrorCorrection> fec)
|
| + : fec_(std::move(fec)),
|
| num_protected_frames_(0),
|
| min_num_media_packets_(1) {
|
| memset(¶ms_, 0, sizeof(params_));
|
| @@ -143,7 +146,7 @@ int ProducerFec::AddRtpPacketAndGenerateFec(const uint8_t* data_buffer,
|
| bool complete_frame = false;
|
| const bool marker_bit = (data_buffer[1] & kRtpMarkerBitMask) ? true : false;
|
| if (media_packets_.size() < kUlpfecMaxMediaPackets) {
|
| - // Generic FEC can only protect up to |kUlpfecMaxMediaPackets| packets.
|
| + // Our packet masks can only protect up to |kUlpfecMaxMediaPackets| packets.
|
| std::unique_ptr<ForwardErrorCorrection::Packet> packet(
|
| new ForwardErrorCorrection::Packet());
|
| packet->length = payload_length + rtp_header_length;
|
|
|