Commit d176b5231b41ea6a875970f4a8e72402718099ff
Committed by
GitHub
Merge pull request #620 from xu-bin-bin/wvp-28181-2.0
处理上级平台发送的invite请求不携带“y=”sdp信息时,使用默认“y=0000000000”视频无法播放的问题。
Showing
1 changed file
with
3 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| ... | ... | @@ -332,14 +332,14 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 332 | 332 | content.append("m=video " + sendRtpItem.getLocalPort() + " RTP/AVP 96\r\n"); |
| 333 | 333 | content.append("a=sendonly\r\n"); |
| 334 | 334 | content.append("a=rtpmap:96 PS/90000\r\n"); |
| 335 | - content.append("y=" + ssrc + "\r\n"); | |
| 335 | + content.append("y=" + sendRtpItem.getSsrc() + "\r\n"); | |
| 336 | 336 | content.append("f=\r\n"); |
| 337 | 337 | |
| 338 | 338 | try { |
| 339 | 339 | // 超时未收到Ack应该回复bye,当前等待时间为10秒 |
| 340 | 340 | dynamicTask.startDelay(callIdHeader.getCallId(), () -> { |
| 341 | 341 | logger.info("Ack 等待超时"); |
| 342 | - mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), ssrc); | |
| 342 | + mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), sendRtpItem.getSsrc()); | |
| 343 | 343 | // 回复bye |
| 344 | 344 | try { |
| 345 | 345 | cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId()); |
| ... | ... | @@ -425,6 +425,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 425 | 425 | SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false); |
| 426 | 426 | logger.info(JSONObject.toJSONString(ssrcInfo)); |
| 427 | 427 | sendRtpItem.setStreamId(ssrcInfo.getStream()); |
| 428 | + sendRtpItem.setSsrc(ssrc.equals(ssrcDefault) ? ssrcInfo.getSsrc() : ssrc); | |
| 428 | 429 | |
| 429 | 430 | // 写入redis, 超时时回复 |
| 430 | 431 | redisCatchStorage.updateSendRTPSever(sendRtpItem); | ... | ... |