修复空指针异常

pull/1694/head
648540858 2024-11-15 17:02:43 +08:00
parent 3c814f33a5
commit 0d32608fa9
3 changed files with 3 additions and 3 deletions

View File

@ -180,7 +180,7 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService {
if (mediaList.getInteger("code") == 0) {
JSONArray data = mediaList.getJSONArray("data");
if (data == null) {
return null;
return streamInfoList;
}
JSONObject mediaJSON = data.getJSONObject(0);
MediaInfo mediaInfo = MediaInfo.getInstance(mediaJSON, mediaServer, userSetting.getServerId());

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);
}
}