From aa6bce35c710750b68d4e6c53095e9be4e1afd8d Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 05 九月 2022 09:44:24 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0'

---
 src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java
index 3e9b530..dc865c8 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java
@@ -25,7 +25,11 @@
     private IRedisCatchStorage redisCatchStorage;
 
     @Autowired
+    private IVideoManagerStorage storager;
+
+    @Autowired
     private IMediaServerService mediaServerService;
+
 
     @Autowired
     private MediaConfig mediaConfig;
@@ -50,9 +54,10 @@
         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) {
@@ -64,7 +69,7 @@
                 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(), true);
+                    streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, addr, calld);
                 }else {
                     streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, addr,null, true);
                 }

--
Gitblit v1.8.0