From e84510254860e916cbb48ec3de4557b14a99d76c Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 26 七月 2019 10:55:22 +0800 Subject: [PATCH] add log --- apipassive.go | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apipassive.go b/apipassive.go index 84dfda5..7da08e0 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,9 +29,11 @@ var l C.int p := C.wrap_fn_info_recorder(h.ffmpeg, &i, &l) - if i == -1 { - return -1, "" - } + // if p == nil { + // return -1, "" + // } + path := C.GoString(p) + fmt.Println("Go get info : ", path, " len: ", l) defer C.free(unsafe.Pointer(p)) return int(i), C.GoString(p) @@ -71,4 +76,4 @@ k := int(key) return d, s, k -} \ No newline at end of file +} -- Gitblit v1.8.0