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 <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38644}
This commit is contained in:
Shaofan Qi 2022-09-25 21:50:56 +08:00 committed by WebRTC LUCI CQ
parent 4db5b979b7
commit 45c882e4be
2 changed files with 2 additions and 1 deletions

View file

@ -106,6 +106,7 @@ Sarah Thompson <sarah@telergy.com>
Satender Saroha <ssaroha@yahoo.com> Satender Saroha <ssaroha@yahoo.com>
Saul Kravitz <Saul.Kravitz@celera.com> Saul Kravitz <Saul.Kravitz@celera.com>
Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com> Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com>
Shaofan Qi <vshaqi@gmail.com>
Shuhai Peng <shuhai.peng@intel.com> Shuhai Peng <shuhai.peng@intel.com>
Silviu Caragea <silviu.cpp@gmail.com> Silviu Caragea <silviu.cpp@gmail.com>
Stefan Gula <steweg@gmail.com> Stefan Gula <steweg@gmail.com>

View file

@ -1940,7 +1940,7 @@ void BuildRtpmap(const MediaContentDescription* media_desc,
if (GetMinValue(maxptimes, &min_maxptime)) { if (GetMinValue(maxptimes, &min_maxptime)) {
AddAttributeLine(kCodecParamMaxPTime, min_maxptime, message); 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 // Populate the ptime attribute with the smallest ptime or the largest
// minptime, whichever is the largest, for all codecs under the same m-line. // minptime, whichever is the largest, for all codecs under the same m-line.
int ptime = INT_MAX; int ptime = INT_MAX;