修复初始化问题,修改获取流逻辑

This commit is contained in:
lijun 2025-01-18 17:09:42 +08:00
parent c6c446c888
commit 0fbc882b09
1 changed files with 4 additions and 4 deletions

View File

@ -35,10 +35,10 @@ func SetDeviceCurrentFrame(frame gocv.Mat, device_id int) error {
} }
frame.CopyTo(&mat) frame.CopyTo(&mat)
DeviceCurrentFrameMap[device_id] = mat DeviceCurrentFrameMap[device_id] = mat
err := mat.Close() //err := mat.Close()
if err != nil { //if err != nil {
return err // return err
} //}
frame_count, ok := DeviceFrameCount.Load(device_id) frame_count, ok := DeviceFrameCount.Load(device_id)
if !ok { if !ok {
return fmt.Errorf("设备:%s 当前帧计数不存在", device_id) return fmt.Errorf("设备:%s 当前帧计数不存在", device_id)