mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
优化关闭媒体源相关逻辑: #1963
This commit is contained in:
@@ -273,14 +273,14 @@ void FFmpegSource::setOnClose(const function<void()> &cb){
|
||||
_onClose = cb;
|
||||
}
|
||||
|
||||
bool FFmpegSource::close(MediaSource &sender, bool force) {
|
||||
bool FFmpegSource::close(MediaSource &sender) {
|
||||
auto listener = getDelegate();
|
||||
if(listener && !listener->close(sender,force)){
|
||||
if (listener && !listener->close(sender)) {
|
||||
//关闭失败
|
||||
return false;
|
||||
}
|
||||
//该流无人观看,我们停止吧
|
||||
if(_onClose){
|
||||
if (_onClose) {
|
||||
_onClose();
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user