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 <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37475}
This commit is contained in:
Philipp Hancke 2022-07-07 11:06:36 +02:00 committed by WebRTC LUCI CQ
parent 4bcf809df7
commit 62c20f305e
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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) {