From 6b28e20257821c46966f4b91bea5dfb88ff0ab72 Mon Sep 17 00:00:00 2001 From: Tommi Date: Sun, 25 Mar 2018 19:52:46 +0200 Subject: [PATCH] Remove unused 'last_rtt_ms_' variable from vcm::VideoStreamDecoder. The effect of this is one less lock being grabbed when updating rtt stats. (Using NoTry=True since the mac_asan and mac_rel bots are acting up) Bug: None Change-Id: I7dac4031573aa54550068a7039e5c2d3054cb50b NoTry: true Reviewed-on: https://webrtc-review.googlesource.com/64522 Commit-Queue: Tommi Reviewed-by: Magnus Flodman Cr-Commit-Position: refs/heads/master@{#22593} --- video/video_stream_decoder.cc | 6 +----- video/video_stream_decoder.h | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/video/video_stream_decoder.cc b/video/video_stream_decoder.cc index b27a52ea89..0388b9c9da 100644 --- a/video/video_stream_decoder.cc +++ b/video/video_stream_decoder.cc @@ -35,8 +35,7 @@ VideoStreamDecoder::VideoStreamDecoder( rtc::VideoSinkInterface* incoming_video_stream) : video_receiver_(video_receiver), receive_stats_callback_(receive_statistics_proxy), - incoming_video_stream_(incoming_video_stream), - last_rtt_ms_(0) { + incoming_video_stream_(incoming_video_stream) { RTC_DCHECK(video_receiver_); static const int kMaxPacketAgeToNack = 450; @@ -128,8 +127,5 @@ void VideoStreamDecoder::OnCompleteFrame(bool is_keyframe, void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { video_receiver_->SetReceiveChannelParameters(max_rtt_ms); - - rtc::CritScope lock(&crit_); - last_rtt_ms_ = avg_rtt_ms; } } // namespace webrtc diff --git a/video/video_stream_decoder.h b/video/video_stream_decoder.h index 812f47b6a3..3cc6e71b55 100644 --- a/video/video_stream_decoder.h +++ b/video/video_stream_decoder.h @@ -96,8 +96,6 @@ class VideoStreamDecoder : public VCMReceiveCallback, ReceiveStatisticsProxy* const receive_stats_callback_; rtc::VideoSinkInterface* const incoming_video_stream_; - - int64_t last_rtt_ms_ RTC_GUARDED_BY(crit_); }; } // namespace webrtc