优化异常处理
This commit is contained in:
@@ -54,9 +54,10 @@ public class MediaServiceImpl implements IMediaService {
|
||||
if (mediaInfo == null) {
|
||||
return null;
|
||||
}
|
||||
String calld = null;
|
||||
StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(app, stream);
|
||||
if (streamAuthorityInfo == null) {
|
||||
return null;
|
||||
if (streamAuthorityInfo != null) {
|
||||
calld = streamAuthorityInfo.getCallId();
|
||||
}
|
||||
JSONObject mediaList = zlmresTfulUtils.getMediaList(mediaInfo, app, stream);
|
||||
if (mediaList != null) {
|
||||
@@ -68,7 +69,7 @@ public class MediaServiceImpl implements IMediaService {
|
||||
JSONObject mediaJSON = JSON.parseObject(JSON.toJSONString(data.get(0)), JSONObject.class);
|
||||
JSONArray tracks = mediaJSON.getJSONArray("tracks");
|
||||
if (authority) {
|
||||
streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, addr,streamAuthorityInfo.getCallId());
|
||||
streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, addr, calld);
|
||||
}else {
|
||||
streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, addr,null);
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||
public boolean start(String app, String stream) {
|
||||
boolean result = false;
|
||||
StreamProxyItem streamProxy = videoManagerStorager.queryStreamProxy(app, stream);
|
||||
if (!streamProxy.isEnable() ) {
|
||||
if (streamProxy != null && !streamProxy.isEnable() ) {
|
||||
JSONObject jsonObject = addStreamProxyToZlm(streamProxy);
|
||||
if (jsonObject == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user