From 45c882e4beb7e3c85573dbfc1a54c77efdf70aa1 Mon Sep 17 00:00:00 2001 From: Shaofan Qi Date: Sun, 25 Sep 2022 21:50:56 +0800 Subject: [PATCH] Allow maxptime equal to minptime in the SDP. The DCHECK crashes debug builds running some applications such as Webex. Bug: None Change-Id: I0061286c4c1d04964678a00014896f1fccd4685d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276460 Commit-Queue: Tomas Gunnarsson Reviewed-by: Tomas Gunnarsson Cr-Commit-Position: refs/heads/main@{#38644} --- AUTHORS | 1 + pc/webrtc_sdp.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 7506cba09e..c991ce8fe5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -106,6 +106,7 @@ Sarah Thompson Satender Saroha Saul Kravitz Sergio Garcia Murillo +Shaofan Qi Shuhai Peng Silviu Caragea Stefan Gula diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc index 39b16901a1..e7ac752f6c 100644 --- a/pc/webrtc_sdp.cc +++ b/pc/webrtc_sdp.cc @@ -1940,7 +1940,7 @@ void BuildRtpmap(const MediaContentDescription* media_desc, if (GetMinValue(maxptimes, &min_maxptime)) { AddAttributeLine(kCodecParamMaxPTime, min_maxptime, message); } - RTC_DCHECK(min_maxptime > max_minptime); + RTC_DCHECK_GE(min_maxptime, max_minptime); // Populate the ptime attribute with the smallest ptime or the largest // minptime, whichever is the largest, for all codecs under the same m-line. int ptime = INT_MAX;