From 51e5858dda6fb386024df0dce2bc38270f1bff02 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 26 七月 2019 10:59:28 +0800 Subject: [PATCH] remove log --- apipassive.go | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apipassive.go b/apipassive.go index 84dfda5..cfa027c 100644 --- a/apipassive.go +++ b/apipassive.go @@ -5,7 +5,10 @@ #include "libcffmpeg.h" */ import "C" -import "unsafe" +import ( + "fmt" + "unsafe" +) // FireRecorder fire recorder func (h *GoFFMPEG) FireRecorder(id int64) { @@ -26,12 +29,15 @@ var l C.int p := C.wrap_fn_info_recorder(h.ffmpeg, &i, &l) - if i == -1 { - return -1, "" - } - defer C.free(unsafe.Pointer(p)) + // if p == nil { + // return -1, "" + // } + path := C.GoString(p) + C.free(unsafe.Pointer(p)) - return int(i), C.GoString(p) + fmt.Println("Go get info : ", path, " len: ", l) + + return int(i), path } // BuildDecoder build decoder @@ -71,4 +77,4 @@ k := int(key) return d, s, k -} \ No newline at end of file +} -- Gitblit v1.8.0