Remove handling in SetRecvParameters that's dead code.
`stream_` will always be non-null when SetRecvParameters is called. For the flexfec stream, the condition won't happen since `IsCompleteAndEnabled` doesn't consider `rtp.extension` state. As is, this code just adds apparent complexity to SetRecvParameters. Bug: none Change-Id: Ie2386905bd8a338669629c7bc5f0abb39bd36d22 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269245 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37597}
This commit is contained in:
@ -3043,6 +3043,7 @@ void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetFeedbackParameters(
|
|||||||
|
|
||||||
void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetRecvParameters(
|
void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetRecvParameters(
|
||||||
const ChangedRecvParameters& params) {
|
const ChangedRecvParameters& params) {
|
||||||
|
RTC_DCHECK(stream_);
|
||||||
bool video_needs_recreation = false;
|
bool video_needs_recreation = false;
|
||||||
if (params.codec_settings) {
|
if (params.codec_settings) {
|
||||||
video_needs_recreation = ConfigureCodecs(*params.codec_settings);
|
video_needs_recreation = ConfigureCodecs(*params.codec_settings);
|
||||||
@ -3051,19 +3052,13 @@ void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetRecvParameters(
|
|||||||
if (params.rtp_header_extensions) {
|
if (params.rtp_header_extensions) {
|
||||||
if (config_.rtp.extensions != *params.rtp_header_extensions) {
|
if (config_.rtp.extensions != *params.rtp_header_extensions) {
|
||||||
config_.rtp.extensions = *params.rtp_header_extensions;
|
config_.rtp.extensions = *params.rtp_header_extensions;
|
||||||
if (stream_) {
|
stream_->SetRtpExtensions(config_.rtp.extensions);
|
||||||
stream_->SetRtpExtensions(config_.rtp.extensions);
|
|
||||||
} else {
|
|
||||||
video_needs_recreation = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flexfec_config_.rtp.extensions != *params.rtp_header_extensions) {
|
if (flexfec_config_.rtp.extensions != *params.rtp_header_extensions) {
|
||||||
flexfec_config_.rtp.extensions = *params.rtp_header_extensions;
|
flexfec_config_.rtp.extensions = *params.rtp_header_extensions;
|
||||||
if (flexfec_stream_) {
|
if (flexfec_stream_) {
|
||||||
flexfec_stream_->SetRtpExtensions(flexfec_config_.rtp.extensions);
|
flexfec_stream_->SetRtpExtensions(flexfec_config_.rtp.extensions);
|
||||||
} else if (flexfec_config_.IsCompleteAndEnabled()) {
|
|
||||||
video_needs_recreation = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user