修复tcp主动录像回放时ssrc不一致时点播失败的问题

This commit is contained in:
648540858
2023-08-03 15:50:15 +08:00
parent 6797f77259
commit a01086fe1c
2 changed files with 9 additions and 37 deletions

View File

@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.conf;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
@@ -100,7 +101,7 @@ public class DynamicTask {
public boolean stop(String key) {
boolean result = false;
if (futureMap.get(key) != null && !futureMap.get(key).isCancelled() && !futureMap.get(key).isDone()) {
if (!ObjectUtils.isEmpty(futureMap.get(key)) && !futureMap.get(key).isCancelled() && !futureMap.get(key).isDone()) {
result = futureMap.get(key).cancel(false);
futureMap.remove(key);
runnableMap.remove(key);