Index: webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc |
diff --git a/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc b/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc |
index be010382a8335bbd7df4dfdad22ce2b2ac5e88dd..e3368e2b8200d643ffdf5a2d91d4a1a39b19e6a0 100644 |
--- a/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc |
+++ b/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc |
@@ -107,7 +107,8 @@ TEST(FecTest, MAYBE_FecTest) { |
ASSERT_EQ(12, kMaxMediaPackets[1]) << "Max media packets for bursty mode not " |
<< "equal to 12."; |
- ForwardErrorCorrection fec; |
+ std::unique_ptr<ForwardErrorCorrection> fec = |
+ ForwardErrorCorrection::CreateUlpfec(); |
ForwardErrorCorrection::PacketList media_packet_list; |
std::list<ForwardErrorCorrection::Packet*> fec_packet_list; |
ForwardErrorCorrection::ReceivedPacketList to_decode_list; |
@@ -238,7 +239,7 @@ TEST(FecTest, MAYBE_FecTest) { |
new ForwardErrorCorrection::Packet()); |
const uint32_t kMinPacketSize = 12; |
const uint32_t kMaxPacketSize = static_cast<uint32_t>( |
- IP_PACKET_SIZE - 12 - 28 - fec.MaxPacketOverhead()); |
+ IP_PACKET_SIZE - 12 - 28 - fec->MaxPacketOverhead()); |
media_packet->length = random.Rand(kMinPacketSize, |
kMaxPacketSize); |
@@ -277,9 +278,9 @@ TEST(FecTest, MAYBE_FecTest) { |
} |
media_packet_list.back()->data[1] |= 0x80; |
- ASSERT_EQ(0, fec.EncodeFec(media_packet_list, protection_factor, |
- num_imp_packets, kUseUnequalProtection, |
- fec_mask_type, &fec_packet_list)) |
+ ASSERT_EQ(0, fec->EncodeFec(media_packet_list, protection_factor, |
+ num_imp_packets, kUseUnequalProtection, |
+ fec_mask_type, &fec_packet_list)) |
<< "EncodeFec() failed"; |
ASSERT_EQ(num_fec_packets, fec_packet_list.size()) |
@@ -393,7 +394,7 @@ TEST(FecTest, MAYBE_FecTest) { |
} |
} |
ASSERT_EQ(0, |
- fec.DecodeFec(&to_decode_list, &recovered_packet_list)) |
+ fec->DecodeFec(&to_decode_list, &recovered_packet_list)) |
<< "DecodeFec() failed"; |
ASSERT_TRUE(to_decode_list.empty()) |
<< "Received packet list is not empty."; |
@@ -421,7 +422,7 @@ TEST(FecTest, MAYBE_FecTest) { |
} |
++media_packet_idx; |
} |
- fec.ResetState(&recovered_packet_list); |
+ fec->ResetState(&recovered_packet_list); |
ASSERT_TRUE(recovered_packet_list.empty()) |
<< "Excessive number of recovered packets.\t size is: " |
<< recovered_packet_list.size(); |
@@ -447,7 +448,7 @@ TEST(FecTest, MAYBE_FecTest) { |
} // loop over mask types |
// Have DecodeFec clear the recovered packet list. |
- fec.ResetState(&recovered_packet_list); |
+ fec->ResetState(&recovered_packet_list); |
ASSERT_TRUE(recovered_packet_list.empty()) |
<< "Recovered packet list is not empty"; |
} |