播放等待时间增加到30秒,避免部分设备(NVR)播放超时

pull/1/head
Lawrence 2020-10-24 15:26:11 +08:00
parent 009e46f7f2
commit e30e28712f
1 changed files with 2 additions and 2 deletions

View File

@ -58,13 +58,13 @@ public class PlayController {
}
String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase();
// 等待推流, TODO 默认超时15s
// 等待推流, TODO 默认超时30s
boolean lockFlag = true;
long startTime = System.currentTimeMillis();
while (lockFlag) {
try {
if (System.currentTimeMillis() - startTime > 15 * 1000) {
if (System.currentTimeMillis() - startTime > 30 * 1000) {
storager.stopPlay(streamInfo);
return new ResponseEntity<String>("timeout",HttpStatus.OK);
}else {