zhangmeng
2019-08-14 ea35d908c05e2916af505ff530eb59486fbef6ee
capture.go
@@ -39,7 +39,7 @@
   gb := false
   if m == GB28181 {
      gb = true
   } else {
   } else if m != Rtsp {
      return nil, errors.New("there is no this mode, try capture.Rtsp/capture.GB28181")
   }
@@ -59,7 +59,7 @@
      Width:  w,
      Height: h,
      GB:     gb,
      CPU:    false,
      CPU:    true,
   }
   gf := goffmpeg.New(conf)
@@ -82,7 +82,7 @@
   var err2 error
   for {
      data, wid, hei := gf.GetPicDecoder()
      data, wid, hei, _ := gf.GetPicDecoder()
      if wid > 0 && hei > 0 {
         img, err := gocv.NewMatFromBytes(hei, wid, gocv.MatTypeCV8UC3, data)
         if err != nil {
@@ -106,7 +106,6 @@
         time.Sleep(time.Second)
      }
   }
   gf.Free()
   if tryTime > maxTry {
      err := fmt.Sprintf("try %d times to capture image, is url correct?\n", tryTime)