mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #503, disable utilities when reload a source. 2.0.233
This commit is contained in:
parent
15570d93ce
commit
99bffea328
3 changed files with 33 additions and 2 deletions
|
@ -346,6 +346,7 @@ Remark:
|
|||
|
||||
## History
|
||||
|
||||
* v2.0, 2017-02-09, fix [#503][bug #503] disable utilities when reload a source. 2.0.233
|
||||
* v2.0, 2017-01-22, for [#752][bug #752] release the io then free it for kbps. 2.0.232
|
||||
* v2.0, 2017-01-18, fix [#750][bug #750] use specific error code for dns resolve. 2.0.231
|
||||
* <strong>v2.0, 2017-01-18, [2.0 beta4(2.0.230)][r2.0b4] released. 86334 lines.</strong>
|
||||
|
@ -1285,6 +1286,7 @@ Winlin
|
|||
[bug #749]: https://github.com/ossrs/srs/issues/749
|
||||
[bug #750]: https://github.com/ossrs/srs/issues/750
|
||||
[bug #752]: https://github.com/ossrs/srs/issues/752
|
||||
[bug #503]: https://github.com/ossrs/srs/issues/503
|
||||
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
|
||||
|
||||
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
||||
|
|
|
@ -1227,6 +1227,12 @@ int SrsSource::on_reload_vhost_forward(string vhost)
|
|||
|
||||
// forwarders
|
||||
destroy_forwarders();
|
||||
|
||||
// Don't start forwarders when source is not active.
|
||||
if (_can_publish) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = create_forwarders()) != ERROR_SUCCESS) {
|
||||
srs_error("create forwarders failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
@ -1247,6 +1253,12 @@ int SrsSource::on_reload_vhost_hls(string vhost)
|
|||
|
||||
#ifdef SRS_AUTO_HLS
|
||||
hls->on_unpublish();
|
||||
|
||||
// Don't start forwarders when source is not active.
|
||||
if (_can_publish) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = hls->on_publish(_req, true)) != ERROR_SUCCESS) {
|
||||
srs_error("hls publish failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
@ -1267,6 +1279,12 @@ int SrsSource::on_reload_vhost_hds(string vhost)
|
|||
|
||||
#ifdef SRS_AUTO_HDS
|
||||
hds->on_unpublish();
|
||||
|
||||
// Don't start forwarders when source is not active.
|
||||
if (_can_publish) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = hds->on_publish(_req)) != ERROR_SUCCESS) {
|
||||
srs_error("hds publish failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
@ -1288,7 +1306,12 @@ int SrsSource::on_reload_vhost_dvr(string vhost)
|
|||
#ifdef SRS_AUTO_DVR
|
||||
// cleanup dvr
|
||||
dvr->on_unpublish();
|
||||
|
||||
|
||||
// Don't start forwarders when source is not active.
|
||||
if (_can_publish) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// reinitialize the dvr, update plan.
|
||||
if ((ret = dvr->initialize(this, _req)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
|
@ -1316,6 +1339,12 @@ int SrsSource::on_reload_vhost_transcode(string vhost)
|
|||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
encoder->on_unpublish();
|
||||
|
||||
// Don't start forwarders when source is not active.
|
||||
if (_can_publish) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = encoder->on_publish(_req)) != ERROR_SUCCESS) {
|
||||
srs_error("start encoder failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 232
|
||||
#define VERSION_REVISION 233
|
||||
|
||||
// generated by configure, only macros.
|
||||
#include <srs_auto_headers.hpp>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue