Browse Source

设备上报分辨率和会诊成员信息增加设备合流、多路画面输出信息

Jeremy 2 years ago
parent
commit
f8a651e943
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Service/DeviceService.cs

+ 2 - 2
Service/DeviceService.cs

@@ -970,9 +970,9 @@ namespace WingDeviceService.Service
                     OutputWidth = video.Width,
                     OutputHeight = video.Height,
                 };
-                var oldVideo = deviceDTO.VideoDeviceInfos?.FirstOrDefault(x => x.VideoDeviceId == video.VideoDeviceId);
-                if (oldVideo != null)
+                if (deviceDTO.VideoDeviceInfos != null && deviceDTO.VideoDeviceInfos.Any(x => x.VideoDeviceId == video.VideoDeviceId))
                 {
+                    var oldVideo = deviceDTO.VideoDeviceInfos.FirstOrDefault(x => x.VideoDeviceId == video.VideoDeviceId);
                     videoDeviceInfo.OutputWidth = oldVideo.OutputWidth;
                     videoDeviceInfo.OutputHeight = oldVideo.OutputHeight;
                 }