srs-gb28181 icon indicating copy to clipboard operation
srs-gb28181 copied to clipboard

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

Open winlinvip opened this issue 4 years ago • 0 comments

描述(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);
     }

winlinvip avatar Jan 05 '22 04:01 winlinvip