修复初始化问题,修改获取流逻辑
This commit is contained in:
parent
c6c446c888
commit
0fbc882b09
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue