增加大华驱动
This commit is contained in:
@@ -641,7 +641,18 @@ public class HikVideoSource : BaseVideoSource,
|
||||
Cv2.CvtColor(rawYuvWrapper, smartFrame.InternalMat, ColorConversionCodes.YUV2BGR_YV12);
|
||||
}
|
||||
|
||||
foreach(var targetAppId in decision.TargetAppIds)
|
||||
// =========================================================
|
||||
// 【新增防御】: 检查转换结果是否有效
|
||||
// 如果转换失败,或者 Mat 为空,绝对不能传给 Router
|
||||
// =========================================================
|
||||
if (smartFrame.InternalMat.Empty())
|
||||
{
|
||||
_sdkLog.Warning($"[SDK] Dahua 解码帧无效 (Empty Mat), 丢弃. 设备ID: {Config.Id} IP:{Config.IpAddress} Name:{Config.Name}");
|
||||
// finally 会负责 Dispose,这里直接返回
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var targetAppId in decision.TargetAppIds)
|
||||
smartFrame.SubscriberIds.Enqueue(targetAppId);
|
||||
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user