From a6dd7933e0bd8ae1fd083639758f7fee9fc7a151 Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期二, 10 九月 2019 16:34:10 +0800
Subject: [PATCH] Merge branch 'master' of ssh://192.168.1.14:29418/valib/goffmpeg

---
 goffmpeg.go |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/goffmpeg.go b/goffmpeg.go
index 8569084..d79d0ba 100644
--- a/goffmpeg.go
+++ b/goffmpeg.go
@@ -160,6 +160,7 @@
 	return int(i), path
 }
 
+// GetRecID get rec id
 func (h *GoFFMPEG) GetRecID(p string) string {
 	pt := C.CString(p)
 	defer C.free(unsafe.Pointer(pt))
@@ -179,20 +180,21 @@
 }
 
 // GetPicDecoder get pic from decoder
-func (h *GoFFMPEG) GetPicDecoder() ([]byte, int, int) {
+func (h *GoFFMPEG) GetPicDecoder() ([]byte, int, int, int64) {
 	var width C.int
 	var height C.int
+	var fid C.long
 
-	p := C.wrap_fn_decoder_pic(h.ffmpeg, &width, &height)
+	p := C.wrap_fn_decoder_pic(h.ffmpeg, &width, &height, &fid)
 	if width == 0 && height == 0 {
-		return nil, 0, 0
+		return nil, 0, 0, 0
 	}
 	defer C.free(unsafe.Pointer(p))
 	d := C.GoBytes(p, width*height*3)
 	wid := int(width)
 	hei := int(height)
-
-	return d, wid, hei
+	gfid := int64(fid)
+	return d, wid, hei, gfid
 }
 
 //GetAVPacket get AVPacket

--
Gitblit v1.8.0