mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-26 11:52:22 +08:00
修复rtsp推流服务器在udp模式下的bug
优化代码
This commit is contained in:
@@ -63,12 +63,17 @@ void RtspPusher::publish(const string &strUrl) {
|
||||
}
|
||||
|
||||
void RtspPusher::onPublishResult(const SockException &ex) {
|
||||
_pPublishTimer.reset();
|
||||
if(_onPublished){
|
||||
_onPublished(ex);
|
||||
_onPublished = nullptr;
|
||||
}else if(_onShutdown){
|
||||
_onShutdown(ex);
|
||||
if(_pPublishTimer){
|
||||
//播放结果回调
|
||||
_pPublishTimer.reset();
|
||||
if(_onPublished){
|
||||
_onPublished(ex);
|
||||
}
|
||||
} else {
|
||||
//播放成功后异常断开回调
|
||||
if(_onShutdown){
|
||||
_onShutdown(ex);
|
||||
}
|
||||
}
|
||||
|
||||
if(ex){
|
||||
|
||||
Reference in New Issue
Block a user