mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 00:47:34 +08:00
修复MediaSource::close线程安全问题
主动或无人观看关闭流可能会由于线程安全问题导致崩溃
This commit is contained in:
@@ -1175,9 +1175,7 @@ int RtspSession::getTrackIndexByInterleaved(int interleaved) {
|
||||
}
|
||||
|
||||
bool RtspSession::close(MediaSource &sender) {
|
||||
//此回调在其他线程触发
|
||||
string err = StrPrinter << "close media: " << sender.getUrl();
|
||||
safeShutdown(SockException(Err_shutdown,err));
|
||||
shutdown(SockException(Err_shutdown,"close media: " + sender.getUrl()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user