修复空指针异常
parent
3c814f33a5
commit
0d32608fa9
|
@ -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());
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue