Allow single-mline offers without BUNDLE group when using max-bundle
since BUNDLE is not meaningful for those cases. This matches Firefox behavior. BUG=chromium:1444615 Change-Id: Id841b7e30a1c920efd977caebc71ab25d084577a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305640 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Philipp Hancke <phancke@microsoft.com> Cr-Commit-Position: refs/heads/main@{#40151}
This commit is contained in:
parent
dff6e25f9e
commit
5f38949c54
@ -813,7 +813,8 @@ RTCError JsepTransportController::ValidateAndMaybeUpdateBundleGroups(
|
||||
|
||||
if (config_.bundle_policy ==
|
||||
PeerConnectionInterface::kBundlePolicyMaxBundle &&
|
||||
!description->HasGroup(cricket::GROUP_TYPE_BUNDLE)) {
|
||||
!description->HasGroup(cricket::GROUP_TYPE_BUNDLE) &&
|
||||
description->contents().size() > 1) {
|
||||
return RTCError(RTCErrorType::INVALID_PARAMETER,
|
||||
"max-bundle is used but no bundle group found.");
|
||||
}
|
||||
|
||||
@ -2727,4 +2727,20 @@ TEST_F(JsepTransportControllerTest, BundleOnlySectionDoesNotNeedRtcpMux) {
|
||||
.ok());
|
||||
}
|
||||
|
||||
// Test that with max-bundle a single unbundled m-line is accepted.
|
||||
TEST_F(JsepTransportControllerTest,
|
||||
MaxBundleDoesNotRequireBundleForFirstMline) {
|
||||
auto config = JsepTransportController::Config();
|
||||
config.bundle_policy = PeerConnectionInterface::kBundlePolicyMaxBundle;
|
||||
CreateJsepTransportController(std::move(config));
|
||||
|
||||
auto offer = std::make_unique<cricket::SessionDescription>();
|
||||
AddAudioSection(offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
|
||||
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
|
||||
nullptr);
|
||||
EXPECT_TRUE(
|
||||
transport_controller_->SetRemoteDescription(SdpType::kOffer, offer.get())
|
||||
.ok());
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user