From be3e53960094cf430a4a81ac91b6c15d0d64c091 Mon Sep 17 00:00:00 2001 From: nisse Date: Wed, 31 May 2017 07:35:16 -0700 Subject: [PATCH] Small cleanup of rtp_rtcp testAPI tests. Delete unused member |rtp_receiver_|, and simplify a return statement. BUG=webrtc:5565 Review-Url: https://codereview.webrtc.org/2912363002 Cr-Commit-Position: refs/heads/master@{#18354} --- webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc index 4eac882bb0..b8b67c703f 100644 --- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc +++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc @@ -57,11 +57,8 @@ bool LoopBackTransport::SendRtp(const uint8_t* data, RTC_CHECK_GE(len, header.headerLength); const size_t payload_length = len - header.headerLength; receive_statistics_->IncomingPacket(header, len, false); - if (!rtp_receiver_->IncomingRtpPacket(header, payload, payload_length, - payload_specific, true)) { - return false; - } - return true; + return rtp_receiver_->IncomingRtpPacket(header, payload, payload_length, + payload_specific, true); } bool LoopBackTransport::SendRtcp(const uint8_t* data, size_t len) { @@ -105,12 +102,9 @@ class RtpRtcpAPITest : public ::testing::Test { module_.reset(RtpRtcp::CreateRtpRtcp(configuration)); module_->SetSSRC(initial_ssrc); rtp_payload_registry_.reset(new RTPPayloadRegistry()); - rtp_receiver_.reset(RtpReceiver::CreateAudioReceiver( - &fake_clock_, NULL, NULL, rtp_payload_registry_.get())); } std::unique_ptr rtp_payload_registry_; - std::unique_ptr rtp_receiver_; std::unique_ptr module_; uint32_t test_ssrc_; uint32_t test_timestamp_;