diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index 9c87a0a6..2087f16e 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -314,6 +314,7 @@ public class PlayServiceImpl implements IPlayService { }, event -> { msg.setData(String.format("回放失败, 错误码: %s, %s", event.statusCode, event.msg)); callback.call(msg); + streamSession.remove(device.getDeviceId(), channelId, ssrcInfo.getStream()); }); return result; } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java index bd8f379c..08f4b269 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java @@ -716,7 +716,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager { try { if (streamProxyMapper.add(streamProxyItem) > 0) { if (!StringUtils.isEmpty(streamProxyItem.getGbId())) { - if (gbStreamMapper.add(streamProxyItem) > 0) { + if (gbStreamMapper.add(streamProxyItem) <= 0) { //事务回滚 dataSourceTransactionManager.rollback(transactionStatus); return false;