当调用mk_media_source_close(ptr, 1);时,主动注销流 (#1401)

* 当调用mk_media_source_close(ptr, 1);时,主动注销流

主动调用上述函数时,期望不再等待RtmpSession.cpp:49处getPoller()->doDelayTask(continue_push_ms, [push_src]() { return 0; });捕获的指针,等待析构时反注册,而是立即反注册。

* `MediaSource::close`逻辑执行成功后执行`unregist`
This commit is contained in:
joshuafc 2022-01-27 14:56:18 +08:00 committed by GitHub
parent 4b2be8e05a
commit c97aa8483e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,7 @@ bool MediaSource::close(bool force) {
if(!listener){
return false;
}
return listener->close(*this,force);
return listener->close(*this,force) && unregist();
}
void MediaSource::onReaderChanged(int size) {