mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SmartPtr: Support shared ptr for SRT source. (#4084)
--- Co-authored-by: Haibo Chen <495810242@qq.com>
This commit is contained in:
parent
6834ec208d
commit
7b9c52b283
9 changed files with 42 additions and 36 deletions
|
@ -1216,11 +1216,11 @@ srs_error_t SrsRtcPublishStream::initialize(SrsRequest* r, SrsRtcSourceDescripti
|
|||
|
||||
// Check whether SRT stream is busy.
|
||||
#ifdef SRS_SRT
|
||||
SrsSrtSource* srt = NULL;
|
||||
bool srt_server_enabled = _srs_config->get_srt_enabled();
|
||||
bool srt_enabled = _srs_config->get_srt_enabled(r->vhost);
|
||||
if (srt_server_enabled && srt_enabled) {
|
||||
if ((err = _srs_srt_sources->fetch_or_create(r, &srt)) != srs_success) {
|
||||
SrsSharedPtr<SrsSrtSource> srt;
|
||||
if ((err = _srs_srt_sources->fetch_or_create(r, srt)) != srs_success) {
|
||||
return srs_error_wrap(err, "create source");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue