From 9492b3eafc40b6a5ded9ecbd58751c88a86f61d7 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期五, 19 七月 2019 17:39:04 +0800
Subject: [PATCH] bug fix
---
capture.go | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/capture.go b/capture.go
index b7c2bee..7958f8a 100644
--- a/capture.go
+++ b/capture.go
@@ -39,7 +39,7 @@
gb := false
if m == GB28181 {
gb = true
- } else {
+ } else if m != Rtsp {
return nil, errors.New("there is no this mode, try capture.Rtsp/capture.GB28181")
}
@@ -59,7 +59,7 @@
Width: w,
Height: h,
GB: gb,
- CPU: false,
+ CPU: true,
}
gf := goffmpeg.New(conf)
@@ -106,7 +106,6 @@
time.Sleep(time.Second)
}
}
- gf.Free()
if tryTime > maxTry {
err := fmt.Sprintf("try %d times to capture image, is url correct?\n", tryTime)
--
Gitblit v1.8.0