Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not reload forward/hls/hds/dvr/trancode when stream unpublish #503 #505

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions trunk/src/app/srs_app_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,10 @@ int SrsSource::on_reload_vhost_forward(string vhost)
return ret;
}

if (_can_publish) {
return ret;
}

// forwarders
destroy_forwarders();
if ((ret = create_forwarders()) != ERROR_SUCCESS) {
Expand All @@ -1178,6 +1182,10 @@ int SrsSource::on_reload_vhost_hls(string vhost)
return ret;
}

if (_can_publish) {
return ret;
}

#ifdef SRS_AUTO_HLS
hls->on_unpublish();
if ((ret = hls->on_publish(_req, true)) != ERROR_SUCCESS) {
Expand All @@ -1198,6 +1206,10 @@ int SrsSource::on_reload_vhost_hds(string vhost)
return ret;
}

if (_can_publish) {
return ret;
}

#ifdef SRS_AUTO_HDS
hds->on_unpublish();
if ((ret = hds->on_publish(_req)) != ERROR_SUCCESS) {
Expand All @@ -1218,6 +1230,10 @@ int SrsSource::on_reload_vhost_dvr(string vhost)
return ret;
}

if (_can_publish) {
return ret;
}

#ifdef SRS_AUTO_DVR
// cleanup dvr
dvr->on_unpublish();
Expand Down Expand Up @@ -1247,6 +1263,10 @@ int SrsSource::on_reload_vhost_transcode(string vhost)
return ret;
}

if (_can_publish) {
return ret;
}

#ifdef SRS_AUTO_TRANSCODE
encoder->on_unpublish();
if ((ret = encoder->on_publish(_req)) != ERROR_SUCCESS) {
Expand Down