From cba2e6b90b50c208e3354d4561b40576a251c370 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期六, 04 六月 2022 23:18:01 +0800
Subject: [PATCH] 优化wasm播放器内存占用问题
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java | 7 ++++---
1 files changed, 4 insertions(+), 3 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 f7551c2..ffd8ec9 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
@@ -40,8 +40,7 @@
private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new ConcurrentHashMap<>();
public void addSubscribe(HookType type, JSONObject hookResponse, ZLMHttpHookSubscribe.Event event) {
- allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>())
- .put(hookResponse, event);
+ allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>()).put(hookResponse, event);
}
public ZLMHttpHookSubscribe.Event getSubscribe(HookType type, JSONObject hookResponse) {
@@ -86,7 +85,9 @@
if (result == null) {
result = key.getString(s).equals(hookResponse.getString(s));
}else {
- if (key.getString(s) == null) continue;
+ if (key.getString(s) == null) {
+ continue;
+ }
result = result && key.getString(s).equals(hookResponse.getString(s));
}
}
--
Gitblit v1.8.0