diff --git a/src/Common/MediaSource.h b/src/Common/MediaSource.h index 8b45a87f..8b2655b0 100644 --- a/src/Common/MediaSource.h +++ b/src/Common/MediaSource.h @@ -175,6 +175,9 @@ public: std::string recv_stream_app; std::string recv_stream_vhost; + + // rtp tcp模式发送时busy时, origin 接收限流, 默认不启用 + bool enable_origin_recv_limit = false; }; // 开始发送ps-rtp [AUTO-TRANSLATED:a51796fa] diff --git a/src/Rtp/RtpSender.cpp b/src/Rtp/RtpSender.cpp index be9adbf6..93a205de 100644 --- a/src/Rtp/RtpSender.cpp +++ b/src/Rtp/RtpSender.cpp @@ -451,7 +451,7 @@ void RtpSender::onFlushRtpList(shared_ptr> rtp_list) { } default: CHECK(0); } - if (_socket_rtp->sockType() == toolkit::SockNum::Sock_TCP && _socket_rtp->isSocketBusy() && _origin_socket) { + if (_args.enable_origin_recv_limit && _socket_rtp->sockType() == toolkit::SockNum::Sock_TCP && _socket_rtp->isSocketBusy() && _origin_socket) { _origin_socket->enableRecv(false); } });