648540858
2022-03-04 b10a65483d709838fbe7d871b83fd5d42f2ef37e
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
@@ -160,15 +160,16 @@
    }
    @Override
    public void closeRTPServer(Device device, String channelId) {
        String mediaServerId = streamSession.getMediaServerId(device.getDeviceId(), channelId);
    public void closeRTPServer(Device device, String channelId, String stream) {
        String mediaServerId = streamSession.getMediaServerId(device.getDeviceId(), channelId, stream);
        String ssrc = streamSession.getSSRC(device.getDeviceId(), channelId, stream);
        MediaServerItem mediaServerItem = this.getOne(mediaServerId);
        if (mediaServerItem != null) {
            String streamId = String.format("%s_%s", device.getDeviceId(), channelId);
            zlmrtpServerFactory.closeRTPServer(mediaServerItem, streamId);
            releaseSsrc(mediaServerItem, streamSession.getSSRC(device.getDeviceId(), channelId));
            releaseSsrc(mediaServerItem, ssrc);
        }
        streamSession.remove(device.getDeviceId(), channelId);
        streamSession.remove(device.getDeviceId(), channelId, stream);
    }
    @Override