修复无法下载较长时间时间录像的BUG

This commit is contained in:
648540858
2024-04-11 22:25:57 +08:00
parent 8750f0f3dd
commit 5c0183a422
4 changed files with 16 additions and 17 deletions

View File

@@ -1044,9 +1044,7 @@ public class PlayServiceImpl implements IPlayService {
};
Hook hook = Hook.getInstance(HookType.on_record_mp4, "rtp", ssrcInfo.getStream(), mediaServerItem.getId());
// 设置过期时间,下载失败时自动处理订阅数据
// long difference = DateUtil.getDifference(startTime, endTime)/1000;
// Instant expiresInstant = Instant.now().plusSeconds(TimeUnit.MINUTES.toSeconds(difference * 2));
// hookSubscribe.setExpires(expiresInstant);
hook.setExpireTime(System.currentTimeMillis() + 24 * 60 * 60 * 1000);
subscribe.addSubscribe(hook, hookEventForRecord);
});
} catch (InvalidArgumentException | SipException | ParseException e) {