ossrs / srs-gb28181

GB28181 server based on SRS
https://ossrs.net
MIT License
83 stars 41 forks source link

GB28181:注销时未及时删除流通道SrsGb28181Manger::delete_stream_channel #2224 #25

Open winlinvip opened 2 years ago

winlinvip commented 2 years ago

描述(Description)

28181注销register(expire=0)时,没有及时清理设备流通道,导致连接两次注册推流间隔太短的话,jitterbuffer报错

  1. SRS版本(Version): 4.0release; develop;

期望行为(Expect)

--- a/trunk/src/app/srs_app_gb28181_sip.cpp
+++ b/trunk/src/app/srs_app_gb28181_sip.cpp
@@ -134,6 +134,9 @@ void SrsGb28181SipSession::destroy()
     //destory all device
     std::map<std::string, SrsGb28181Device*>::iterator it;
     for (it = _device_list.begin(); it != _device_list.end(); ++it) {
+        std::string chid = it->first;
+        _srs_gb28181->delete_stream_channel(_session_id, chid);
+
         srs_freep(it->second);
     }