From 1f11a8a98e70606664a103dfa65ec448cc81738a Mon Sep 17 00:00:00 2001
From: zhangmeng <zhangmeng@aiotlink.com>
Date: 星期四, 19 十二月 2019 14:22:05 +0800
Subject: [PATCH] update

---
 gohumantrack/gohumantrack.go |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gohumantrack/gohumantrack.go b/gohumantrack/gohumantrack.go
index e7327ab..1f68990 100644
--- a/gohumantrack/gohumantrack.go
+++ b/gohumantrack/gohumantrack.go
@@ -153,8 +153,8 @@
 	}
 
 	cRet := C.process(h.handle, cImgs, C.int(h.batchSize), h.result)
-	if cRet == nil {
-		return nil, errors.New("create C results error")
+	if cRet != 0 {
+		return nil, fmt.Errorf("process error: %d", int(cRet))
 	}
 
 	var result []FgResult
@@ -188,7 +188,7 @@
 
 	cRet := C.process(h.handle, cImgs, C.int(h.batchSize), h.result)
 	if cRet != 0 {
-		return nil, fmt.Errorf("process error: %d", cRet)
+		return nil, fmt.Errorf("process image pointer error: %d", int(cRet))
 	}
 
 	var result []FgResult

--
Gitblit v1.8.0