Commit e30e28712f7ec5a3c5514484b34bdde11d0954c3
1 parent
009e46f7
播放等待时间增加到30秒,避免部分设备(NVR)播放超时
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
| @@ -58,13 +58,13 @@ public class PlayController { | @@ -58,13 +58,13 @@ public class PlayController { | ||
| 58 | 58 | ||
| 59 | } | 59 | } |
| 60 | String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); | 60 | String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); |
| 61 | - // 等待推流, TODO 默认超时15s | 61 | + // 等待推流, TODO 默认超时30s |
| 62 | boolean lockFlag = true; | 62 | boolean lockFlag = true; |
| 63 | long startTime = System.currentTimeMillis(); | 63 | long startTime = System.currentTimeMillis(); |
| 64 | 64 | ||
| 65 | while (lockFlag) { | 65 | while (lockFlag) { |
| 66 | try { | 66 | try { |
| 67 | - if (System.currentTimeMillis() - startTime > 15 * 1000) { | 67 | + if (System.currentTimeMillis() - startTime > 30 * 1000) { |
| 68 | storager.stopPlay(streamInfo); | 68 | storager.stopPlay(streamInfo); |
| 69 | return new ResponseEntity<String>("timeout",HttpStatus.OK); | 69 | return new ResponseEntity<String>("timeout",HttpStatus.OK); |
| 70 | }else { | 70 | }else { |