Index: webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc b/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc |
index 110e7c0b854e881891aeac889185d09bf303c11a..d2e1ce7e6b11283a806d0afc249537f2edfda4a5 100644 |
--- a/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc |
+++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc |
@@ -39,14 +39,16 @@ using ::webrtc::test::fec::RawRtpPacket; |
class ReceiverFecTest : public ::testing::Test { |
protected: |
- ReceiverFecTest() : receiver_fec_(FecReceiver::Create(&rtp_data_callback_)) {} |
+ ReceiverFecTest() |
+ : fec_(ForwardErrorCorrection::CreateUlpfec()), |
+ receiver_fec_(FecReceiver::Create(&rtp_data_callback_)) {} |
void EncodeFec(ForwardErrorCorrection::PacketList* media_packets, |
std::list<ForwardErrorCorrection::Packet*>* fec_packets, |
unsigned int num_fec_packets) { |
uint8_t protection_factor = num_fec_packets * 255 / media_packets->size(); |
- EXPECT_EQ(0, fec_.EncodeFec(*media_packets, protection_factor, 0, false, |
- kFecMaskBursty, fec_packets)); |
+ EXPECT_EQ(0, fec_->EncodeFec(*media_packets, protection_factor, 0, false, |
+ kFecMaskBursty, fec_packets)); |
ASSERT_EQ(num_fec_packets, fec_packets->size()); |
} |
@@ -95,7 +97,7 @@ class ReceiverFecTest : public ::testing::Test { |
uint8_t ulpfec_payload_type); |
MockRtpData rtp_data_callback_; |
- ForwardErrorCorrection fec_; |
+ std::unique_ptr<ForwardErrorCorrection> fec_; |
std::unique_ptr<FecReceiver> receiver_fec_; |
FrameGenerator generator_; |
}; |
@@ -260,9 +262,9 @@ TEST_F(ReceiverFecTest, TooManyFrames) { |
GenerateFrame(1, i, &media_rtp_packets, &media_packets); |
} |
std::list<ForwardErrorCorrection::Packet*> fec_packets; |
- EXPECT_EQ( |
- -1, fec_.EncodeFec(media_packets, kNumFecPackets * 255 / kNumMediaPackets, |
- 0, false, kFecMaskBursty, &fec_packets)); |
+ EXPECT_EQ(-1, fec_->EncodeFec(media_packets, |
+ kNumFecPackets * 255 / kNumMediaPackets, 0, |
+ false, kFecMaskBursty, &fec_packets)); |
} |
TEST_F(ReceiverFecTest, PacketNotDroppedTooEarly) { |