Call SetVideoCodecSwitchingEnabled on every video media channel.
It was only being called for the first video media channel; with unified plan SDP mode, it's possible to have multiple video media channels, one for each video m= section. Bug: webrtc:10795 Change-Id: I57fda9383d0f8803df1937ac5103d9ae354c0748 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182404 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Taylor <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32010}
This commit is contained in:
parent
3cdde9771d
commit
6b381c7456
@ -4077,9 +4077,14 @@ RTCError PeerConnection::SetConfiguration(
|
||||
}
|
||||
|
||||
if (modified_config.allow_codec_switching.has_value()) {
|
||||
cricket::VideoMediaChannel* video_channel = video_media_channel();
|
||||
if (video_channel) {
|
||||
video_channel->SetVideoCodecSwitchingEnabled(
|
||||
for (const auto& transceiver : transceivers_) {
|
||||
if (transceiver->media_type() != cricket::MEDIA_TYPE_VIDEO ||
|
||||
!transceiver->internal()->channel()) {
|
||||
continue;
|
||||
}
|
||||
auto* video_channel = static_cast<cricket::VideoChannel*>(
|
||||
transceiver->internal()->channel());
|
||||
video_channel->media_channel()->SetVideoCodecSwitchingEnabled(
|
||||
*modified_config.allow_codec_switching);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user