修复回放失败出现脏数据的问题以及添加拉流代理判断错误的问题

This commit is contained in:
648540858 2022-03-04 11:26:53 +08:00
parent 1f39c6c62f
commit 16e8aa323f
2 changed files with 2 additions and 1 deletions

View File

@ -314,6 +314,7 @@ public class PlayServiceImpl implements IPlayService {
}, event -> { }, event -> {
msg.setData(String.format("回放失败, 错误码: %s, %s", event.statusCode, event.msg)); msg.setData(String.format("回放失败, 错误码: %s, %s", event.statusCode, event.msg));
callback.call(msg); callback.call(msg);
streamSession.remove(device.getDeviceId(), channelId, ssrcInfo.getStream());
}); });
return result; return result;
} }

View File

@ -716,7 +716,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
try { try {
if (streamProxyMapper.add(streamProxyItem) > 0) { if (streamProxyMapper.add(streamProxyItem) > 0) {
if (!StringUtils.isEmpty(streamProxyItem.getGbId())) { if (!StringUtils.isEmpty(streamProxyItem.getGbId())) {
if (gbStreamMapper.add(streamProxyItem) > 0) { if (gbStreamMapper.add(streamProxyItem) <= 0) {
//事务回滚 //事务回滚
dataSourceTransactionManager.rollback(transactionStatus); dataSourceTransactionManager.rollback(transactionStatus);
return false; return false;