From 3e62775db7809875212654c22715ca7324688b9e Mon Sep 17 00:00:00 2001 From: custompal <1040801756@qq.com> Date: Fri, 17 Jun 2022 18:21:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E4=BA=BA=E8=A7=82=E7=9C=8B=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=99=A8=E6=8C=87=E5=AE=9A=E4=B8=BAMediaSource?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E6=89=80=E5=B1=9Epoller=E4=BB=A5=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E8=AF=BB=E5=8F=96=E8=A7=82=E7=9C=8B=E6=95=B0=E6=98=AF?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E5=AE=89=E5=85=A8=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/MediaSource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/MediaSource.cpp b/src/Common/MediaSource.cpp index 4a3b4373..531221ba 100644 --- a/src/Common/MediaSource.cpp +++ b/src/Common/MediaSource.cpp @@ -581,7 +581,7 @@ MediaSource::Ptr MediaSource::createFromMP4(const string &schema, const string & /////////////////////////////////////MediaSourceEvent////////////////////////////////////// void MediaSourceEvent::onReaderChanged(MediaSource &sender, int size){ - if (size || totalReaderCount(sender)) { + if (size) { //还有人观看该视频,不触发关闭事件 _async_close_timer = nullptr; return; @@ -618,7 +618,7 @@ void MediaSourceEvent::onReaderChanged(MediaSource &sender, int size){ strong_sender->close(false); } return false; - }, nullptr); + }, getOwnerPoller(sender)); } string MediaSourceEvent::getOriginUrl(MediaSource &sender) const {