diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc index 1f31c41d0b..b506c1e9c2 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -703,10 +703,6 @@ void RtpVideoStreamReceiver2::SendLossNotification( decodability_flag, buffering_allowed); } -bool RtpVideoStreamReceiver2::IsUlpfecEnabled() const { - return config_.rtp.ulpfec_payload_type != -1; -} - bool RtpVideoStreamReceiver2::IsDecryptable() const { RTC_DCHECK_RUN_ON(&worker_task_checker_); return frames_decryptable_; diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h index 4fc11da1c9..39d34cb524 100644 --- a/video/rtp_video_stream_receiver2.h +++ b/video/rtp_video_stream_receiver2.h @@ -148,8 +148,6 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, bool decodability_flag, bool buffering_allowed) override; - bool IsUlpfecEnabled() const; - // Returns true if a decryptor is attached and frames can be decrypted. // Updated by OnDecryptionStatusChangeCallback. Note this refers to Frame // Decryption not SRTP. diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index ec40b414d7..cf10a45d40 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -351,8 +351,8 @@ void VideoReceiveStream2::Start() { return; } - const bool protected_by_fec = config_.rtp.protected_by_flexfec || - rtp_video_stream_receiver_.IsUlpfecEnabled(); + const bool protected_by_fec = + config_.rtp.protected_by_flexfec || config_.rtp.ulpfec_payload_type != -1; if (config_.rtp.nack.rtp_history_ms > 0 && protected_by_fec) { frame_buffer_->SetProtectionMode(kProtectionNackFEC); @@ -532,8 +532,8 @@ void VideoReceiveStream2::SetNackHistory(TimeDelta history) { // TODO(tommi): Stop using the config struct for the internal state. const_cast(config_.rtp.nack.rtp_history_ms) = history.ms(); - const bool protected_by_fec = config_.rtp.protected_by_flexfec || - rtp_video_stream_receiver_.IsUlpfecEnabled(); + const bool protected_by_fec = + config_.rtp.protected_by_flexfec || config_.rtp.ulpfec_payload_type != -1; frame_buffer_->SetProtectionMode(history.ms() > 0 && protected_by_fec ? kProtectionNackFEC