From 080acae08ec8cfe413c3e6e45bcf7f9222dfa02d Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期四, 24 十月 2019 16:50:28 +0800
Subject: [PATCH] update

---
 csrc/thirdparty/gb28181/include/PsToEs.hpp |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/csrc/thirdparty/gb28181/include/PsToEs.hpp b/csrc/thirdparty/gb28181/include/PsToEs.hpp
index 51f613a..2ac629d 100644
--- a/csrc/thirdparty/gb28181/include/PsToEs.hpp
+++ b/csrc/thirdparty/gb28181/include/PsToEs.hpp
@@ -174,20 +174,24 @@
 		}
 	}
 
-	void addCamera(string &rtsp){
+	long addCamera(string &rtsp){
 //		long userdata = 1001;//
-		printf("RTSPSTREAM_Open\n");
 		handle = RTSPSTREAM_Open(rtsp.c_str(), streamCallBack, (long)this);
-//		return handle;
+		printf("RTSPSTREAM_Open, handle:%ld \n", handle);
+		return handle;
 	}
 
 	void deleteCamera(){
 		printf("RTSPSTREAM_Close\n");
-		RTSPSTREAM_Close(handle);
+		if(handle != -1){
+			RTSPSTREAM_Close(handle);
+		}
+
+		handle = -1;
 	}	
 private:
 	MyQueue<frameBuffInfo *> m_rtpQueue;
-	long handle;
+	long handle = -1;
 };
 
 

--
Gitblit v1.8.0