diff --git a/src/Rtmp/RtmpMediaSource.h b/src/Rtmp/RtmpMediaSource.h index ea868703..396b65fb 100644 --- a/src/Rtmp/RtmpMediaSource.h +++ b/src/Rtmp/RtmpMediaSource.h @@ -127,9 +127,9 @@ public: private: void onReaderChanged(int size){ + _readerTicker.resetTime(); if(size != 0 || readerCount() != 0){ //还有消费者正在观看该流,我们记录最后一次活动时间 - _readerTicker.resetTime(); _asyncEmitNoneReader = false; return; } diff --git a/src/Rtsp/RtspMediaSource.h b/src/Rtsp/RtspMediaSource.h index 56743f85..c5a321d2 100644 --- a/src/Rtsp/RtspMediaSource.h +++ b/src/Rtsp/RtspMediaSource.h @@ -143,9 +143,9 @@ public: } private: void onReaderChanged(int size){ + _readerTicker.resetTime(); if(size != 0 || readerCount() != 0){ //还有消费者正在观看该流,我们记录最后一次活动时间 - _readerTicker.resetTime(); _asyncEmitNoneReader = false; return; }