修复空指针异常

This commit is contained in:
648540858
2024-11-15 17:02:43 +08:00
parent 3c814f33a5
commit 0d32608fa9
3 changed files with 3 additions and 3 deletions

View File

@@ -84,7 +84,7 @@ public class StreamPush extends CommonGBChannel implements Comparable<StreamPush
- DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(streamPushItem.getCreateTime())).intValue();
}
public StreamPush getInstance(StreamInfo streamInfo) {
public static StreamPush getInstance(StreamInfo streamInfo) {
StreamPush streamPush = new StreamPush();
streamPush.setApp(streamInfo.getApp());
if (streamInfo.getMediaServer() != null) {

View File

@@ -535,7 +535,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
String key = streamInfo.getApp() + "_" + streamInfo.getStream();
StreamPush streamPushItem = result.get(key);
if (streamPushItem == null) {
streamPushItem = streamPushItem.getInstance(streamInfo);
streamPushItem = StreamPush.getInstance(streamInfo);
result.put(key, streamPushItem);
}
}