From 940a92dea5bb1f720e939fb76eb72b888a4d2cfb Mon Sep 17 00:00:00 2001 From: lijun Date: Sat, 18 Jan 2025 19:36:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=88=86=E7=A6=BB=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A7=86=E9=A2=91=E6=B5=81?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/tool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/tool.go b/service/tool.go index 7230485..c64b932 100644 --- a/service/tool.go +++ b/service/tool.go @@ -189,6 +189,9 @@ func getVideoFrame(device proto.DeviceInfo) { if device.NextStop { break } + if frame.Empty() { + frame = gocv.NewMat() + } frame = gocv.NewMat() ok := webcam.Read(&frame) if !ok {