优化hls媒体流注册与无人观看清理机制 (#1421)

* 优化hls媒体流注册与无人观看清理机制

* 优化hls cookie管理

* bug fixed
This commit is contained in:
夏楚
2022-02-12 16:24:55 +08:00
committed by GitHub
parent 2fbd8de727
commit e37982adee
5 changed files with 62 additions and 91 deletions

View File

@@ -23,7 +23,7 @@ HlsCookieData::HlsCookieData(const MediaInfo &info, const std::shared_ptr<SockIn
void HlsCookieData::addReaderCount() {
if (!*_added) {
auto src = std::dynamic_pointer_cast<HlsMediaSource>(MediaSource::find(HLS_SCHEMA, _info._vhost, _info._app, _info._streamid));
auto src = getMediaSource();
if (src) {
*_added = true;
_ring_reader = src->getRing()->attach(EventPollerPool::Instance().getPoller());