RTC: fix play crash or no stream for rtmp2rtc tips.(#2728) (#2863)

pull/2867/head
chundonglinlin 3 years ago committed by GitHub
parent f178d7aae0
commit c85daeb12d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -187,9 +187,9 @@ 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_to_rtmp(ruc.req_->vhost)) {
if (!_srs_config->get_rtc_from_rtmp(ruc.req_->vhost)) {
SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_);
if (!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());
}
}

Loading…
Cancel
Save