From 7950b86a4bf821e126d5e5659b772ce32faa1445 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 25 五月 2021 11:32:24 +0800 Subject: [PATCH] bug fixed declaration --- goffmpeg.go | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/goffmpeg.go b/goffmpeg.go index 393cd04..485e568 100644 --- a/goffmpeg.go +++ b/goffmpeg.go @@ -112,8 +112,8 @@ C.wrap_fn_destroy(unsafe.Pointer(libcffmpeg), f) } FreeFFmpeg() + return nil } - return nil } return &GoFFMPEG{ @@ -142,8 +142,8 @@ C.wrap_fn_destroy(unsafe.Pointer(libcffmpeg), f) } FreeFFmpeg() + return nil } - return nil } return &GoFFMPEG{ @@ -209,12 +209,12 @@ } // GetGBJpg Get GB28181 Jpg -func GetGBJpg(rtspURL string) []byte { +func GetGBJpg(rtspURL string, maxTry int) []byte { rtsp := C.CString(rtspURL) defer C.free(unsafe.Pointer(rtsp)) var jpgLen C.int - pic := C.wrap_fn_get_gb28181_pic(unsafe.Pointer(libcffmpeg), rtsp, &jpgLen) + pic := C.wrap_fn_get_gb28181_pic(unsafe.Pointer(libcffmpeg), rtsp, &jpgLen, C.int(maxTry)) defer C.free(unsafe.Pointer(pic)) retJpg := C.GoBytes(unsafe.Pointer(pic), jpgLen) -- Gitblit v1.8.0