From 6faf7fc99439f4537d24d479ee42dd95331a2e71 Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: 星期一, 11 一月 2021 20:42:40 +0800 Subject: [PATCH] 修正录像回放streamId赋值 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java index a4389cf..0c00b82 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java @@ -13,6 +13,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; +import org.springframework.util.ConcurrentReferenceHashMap; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -20,6 +21,7 @@ import java.text.DecimalFormat; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** * @Description:閽堝 ZLMediaServer鐨刪ook浜嬩欢璁㈤槄 @@ -50,7 +52,7 @@ void response(JSONObject response); } - private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new HashMap<>(); + private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new ConcurrentHashMap<>(); public void addSubscribe(HookType type, JSONObject hookResponse, ZLMHttpHookSubscribe.Event event) { Map<JSONObject, Event> eventMap = allSubscribes.get(type); -- Gitblit v1.8.0