From 9eb6ce1cd01c7e0d1cca714a504a2ccbc81b0e94 Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Fri, 15 Dec 2017 12:25:01 +0100 Subject: [PATCH] Remove redundant member variable in RtpRtcp Bug: None Change-Id: Ia999bb4020c8f270c916074e5c58bab15f6c77d0 Reviewed-on: https://webrtc-review.googlesource.com/33300 Reviewed-by: Niels Moller Commit-Queue: Danil Chapovalov Cr-Commit-Position: refs/heads/master@{#24848} --- modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 15 +++++---------- modules/rtp_rtcp/source/rtp_rtcp_impl.h | 3 +-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index b22267f793..3af91deb03 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -80,8 +80,7 @@ ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration) kRtpRtcpMaxIdleTimeProcessMs), next_keepalive_time_(-1), packet_overhead_(28), // IPV4 UDP. - nack_last_time_sent_full_(0), - nack_last_time_sent_full_prev_(0), + nack_last_time_sent_full_ms_(0), nack_last_seq_number_sent_(0), key_frame_req_method_(kKeyFrameReqPliRtcp), remote_bitrate_(configuration.remote_bitrate_estimator), @@ -668,10 +667,9 @@ int32_t ModuleRtpRtcpImpl::SendNACK(const uint16_t* nack_list, } uint16_t nack_length = size; uint16_t start_id = 0; - int64_t now = clock_->TimeInMilliseconds(); - if (TimeToSendFullNackList(now)) { - nack_last_time_sent_full_ = now; - nack_last_time_sent_full_prev_ = now; + int64_t now_ms = clock_->TimeInMilliseconds(); + if (TimeToSendFullNackList(now_ms)) { + nack_last_time_sent_full_ms_ = now_ms; } else { // Only send extended list. if (nack_last_seq_number_sent_ == nack_list[size - 1]) { @@ -719,10 +717,7 @@ bool ModuleRtpRtcpImpl::TimeToSendFullNackList(int64_t now) const { } // Send a full NACK list once within every |wait_time|. - if (rtt_stats_) { - return now - nack_last_time_sent_full_ > wait_time; - } - return now - nack_last_time_sent_full_prev_ > wait_time; + return now - nack_last_time_sent_full_ms_ > wait_time; } // Store the sent packets, needed to answer to Negative acknowledgment requests. diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h index 5706967426..afb4ee60c2 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h @@ -338,8 +338,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp { uint16_t packet_overhead_; // Send side - int64_t nack_last_time_sent_full_; - uint32_t nack_last_time_sent_full_prev_; + int64_t nack_last_time_sent_full_ms_; uint16_t nack_last_seq_number_sent_; KeyFrameRequestMethod key_frame_req_method_;