rtp主动推流时不触发无人观看事件:#799

This commit is contained in:
xiongziliang
2021-04-18 21:27:44 +08:00
parent 5fd23c4cf7
commit 387574a802
2 changed files with 9 additions and 0 deletions

View File

@@ -520,6 +520,7 @@ MediaSource::Ptr MediaSource::createFromMP4(const string &schema, const string &
void MediaSourceEvent::onReaderChanged(MediaSource &sender, int size){
if (size || totalReaderCount(sender)) {
//还有人观看该视频,不触发关闭事件
_async_close_timer = nullptr;
return;
}
//没有任何人观看该视频源,表明该源可以关闭了