From 62c20f305ef513b3052c8f000e115a93c524ae1c Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Thu, 7 Jul 2022 11:06:36 +0200 Subject: [PATCH] sdp: temporarily relax clockrate requirements for statically assigned payload types to allow for downstream users to upgrade. BUG=chromium:1338902 Change-Id: If6b56ab63f7859c13e9ebc70326e1088e5dfff1a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268141 Commit-Queue: Philipp Hancke Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#37475} --- pc/webrtc_sdp.cc | 2 +- pc/webrtc_sdp_unittest.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc index c942689b8f..ae4e58d9f4 100644 --- a/pc/webrtc_sdp.cc +++ b/pc/webrtc_sdp.cc @@ -3636,9 +3636,9 @@ bool ParseRtpmapAttribute(absl::string_view line, AudioContentDescription* audio_desc = media_desc->as_audio(); for (const cricket::AudioCodec& existing_codec : audio_desc->codecs()) { + // TODO(crbug.com/1338902) re-add check for clockrate. if (!existing_codec.name.empty() && payload_type == existing_codec.id && (!absl::EqualsIgnoreCase(encoding_name, existing_codec.name) || - clock_rate != existing_codec.clockrate || channels != existing_codec.channels)) { rtc::StringBuilder description; description diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc index 02f990b381..7880af0693 100644 --- a/pc/webrtc_sdp_unittest.cc +++ b/pc/webrtc_sdp_unittest.cc @@ -4665,11 +4665,10 @@ TEST_F(WebRtcSdpTest, DuplicateAudioRtpmapWithConflict) { "s=-\r\n" "t=0 0\r\n" "m=audio 49232 RTP/AVP 108\r\n" - // Same name but different payload type. "a=rtpmap:108 ISAC/16000\r\n" - "a=rtpmap:108 ISAC/32000\r\n"; + "a=rtpmap:108 G711/16000\r\n"; - ExpectParseFailure(sdp, "a=rtpmap:108 ISAC/32000"); + ExpectParseFailure(sdp, "a=rtpmap:108 G711/16000"); } TEST_F(WebRtcSdpTest, DuplicateVideoRtpmapWithConflict) {