Update SipUtils.java

修复点播取流失败
pull/889/head
wanghui 2023-06-11 16:24:08 +08:00 committed by GitHub
parent 52f9c295f9
commit 64c15fa53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ public class SipUtils {
if (mediaDescriptionIndex == 0 && ssrcIndex == 0) {
sdp = SdpFactory.getInstance().createSessionDescription(sdpStr);
}else {
int baseSdpIndex = Math.min(mediaDescriptionIndex, ssrcIndex);
int baseSdpIndex = Math.max(mediaDescriptionIndex, ssrcIndex);
//ssrc规定长度为10字节不取余下长度以避免后续还有“f=”字段
String substring = sdpStr.substring(0, baseSdpIndex);
sdp = SdpFactory.getInstance().createSessionDescription(substring);