mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 19:31:53 +00:00
Refine error log for rtmp2rtc. (#2728). v4.0.215
This commit is contained in:
parent
add4ff38ec
commit
8bc2759c7e
4 changed files with 11 additions and 2 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 4.0 Changelog
|
||||
|
||||
* v4.0, 2021-12-31, For [#2728](https://github.com/ossrs/srs/issues/2728): Refine error log for rtmp2rtc. (#2728). v4.0.215
|
||||
* v4.0, 2021-12-29, Merge [#2770](https://github.com/ossrs/srs/pull/2770), [#2820](https://github.com/ossrs/srs/pull/2820): Bugs fixed. (#2770)(#2820). v4.0.214
|
||||
* v4.0, 2021-12-27, Fix [#2811](https://github.com/ossrs/srs/issues/2811): Fix ulimit issue by detecting epoll on Ubuntu. (#2811). v4.0.213
|
||||
* v4.0, 2021-12-26, Fix [#2247](https://github.com/ossrs/srs/pull/2247): Cleanup server for GMC, by WaitGroup to destroy. (#2247). v4.0.212
|
||||
|
|
|
@ -185,6 +185,14 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|||
server_enabled, rtc_enabled, ruc.req_->vhost.c_str());
|
||||
}
|
||||
|
||||
// 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)) {
|
||||
SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_);
|
||||
if (!rtmp->inactive()) {
|
||||
return srs_error_new(ERROR_RTC_DISABLED, "Disabled rtmp_to_rtc of %s, see #2728", ruc.req_->vhost.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: FIXME: When server enabled, but vhost disabled, should report error.
|
||||
SrsRtcConnection* session = NULL;
|
||||
if ((err = server_->create_session(&ruc, local_sdp, &session)) != srs_success) {
|
||||
|
|
|
@ -448,7 +448,7 @@ public:
|
|||
// @param h the event handler for source.
|
||||
// @param pps the matched source, if success never be NULL.
|
||||
virtual srs_error_t fetch_or_create(SrsRequest* r, ISrsLiveSourceHandler* h, SrsLiveSource** pps);
|
||||
private:
|
||||
public:
|
||||
// Get the exists source, NULL when not exists.
|
||||
// update the request and return the exists source.
|
||||
virtual SrsLiveSource* fetch(SrsRequest* r);
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 214
|
||||
#define VERSION_REVISION 215
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue