Commit fc7f1b3459d9c65a37cae25bc254a6a3d62cc6db
1 parent
a574ff09
处理上级平台发送的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 | cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId()); |
| 345 | 345 | }, 60 * 1000); |
| ... | ... | @@ -421,6 +421,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 421 | 421 | SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false); |
| 422 | 422 | logger.info(JSONObject.toJSONString(ssrcInfo)); |
| 423 | 423 | sendRtpItem.setStreamId(ssrcInfo.getStream()); |
| 424 | + sendRtpItem.setSsrc(ssrc.equals(ssrcDefault) ? ssrcInfo.getSsrc() : ssrc); | |
| 424 | 425 | |
| 425 | 426 | // 写入redis, 超时时回复 |
| 426 | 427 | redisCatchStorage.updateSendRTPSever(sendRtpItem); | ... | ... |