[WebRtcVideoReceiveStream] Add ability to config flexfec post init.

Bug: webrtc:11993
Change-Id: I35d7e645e18b7cb4a86645ea52c8958063f13d3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269243
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37661}
This commit is contained in:
Tommi
2022-08-02 11:51:20 +02:00
committed by WebRTC LUCI CQ
parent 5e13d0599c
commit 185f10c082
8 changed files with 51 additions and 12 deletions

View File

@ -3060,9 +3060,9 @@ void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetFlexFecPayload(
flexfec_stream_->SetPayloadType(payload_type);
if (payload_type == -1) {
// TODO(tommi): Delete `flexfec_stream_` and clear references to it from
// `stream_` without having to recreate `stream_`.
flexfec_needs_recreation = true;
stream_->SetFlexFecProtection(nullptr);
call_->DestroyFlexfecReceiveStream(flexfec_stream_);
flexfec_stream_ = nullptr;
}
} else if (payload_type != -1) {
flexfec_config_.payload_type = payload_type;