From 750c58beff5700c020a03cbf66d9b59940f363ac Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Tue, 11 Jan 2022 08:18:06 +0800 Subject: [PATCH] RTC: fix play rtc judge for rtmp inactive.(#2863) (#2867) --- trunk/src/app/srs_app_rtc_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index de5134b8b..d72b192e1 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -189,7 +189,7 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe // For RTMP to RTC, fail if disabled and RTMP is active, see https://github.com/ossrs/srs/issues/2728 if (!_srs_config->get_rtc_from_rtmp(ruc.req_->vhost)) { SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_); - if (rtmp && rtmp->inactive()) { + if (rtmp && !rtmp->inactive()) { return srs_error_new(ERROR_RTC_DISABLED, "Disabled rtmp_to_rtc of %s, see #2728", ruc.req_->vhost.c_str()); } }