1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #736, recovery the hls dispose. 2.0.227

This commit is contained in:
winlin 2017-01-11 09:25:48 +08:00
parent 087a596a63
commit e3aa34ec5f
3 changed files with 12 additions and 6 deletions

View file

@ -345,6 +345,7 @@ Remark:
## History ## History
* v2.0, 2017-01-11, fix [#736][bug #736], recovery the hls dispose. 2.0.227
* v2.0, 2017-01-10, refine hls html5 video template. * v2.0, 2017-01-10, refine hls html5 video template.
* v2.0, 2017-01-10, fix [#635][bug #635], hls support NonIDR(open gop). 2.0.226 * v2.0, 2017-01-10, fix [#635][bug #635], hls support NonIDR(open gop). 2.0.226
* v2.0, 2017-01-06, for [#730][bug #730], reset ack follow flash player rules. 2.0.225 * v2.0, 2017-01-06, for [#730][bug #730], reset ack follow flash player rules. 2.0.225

View file

@ -794,14 +794,9 @@ int SrsSource::cycle_all()
{ {
int ret = ERROR_SUCCESS; int ret = ERROR_SUCCESS;
// TODO: FIXME: support source cleanup.
// @see https://github.com/ossrs/srs/issues/713
// @see https://github.com/ossrs/srs/issues/714
#if 0
int cid = _srs_context->get_id(); int cid = _srs_context->get_id();
ret = do_cycle_all(); ret = do_cycle_all();
_srs_context->set_id(cid); _srs_context->set_id(cid);
#endif
return ret; return ret;
} }
@ -813,10 +808,17 @@ int SrsSource::do_cycle_all()
std::map<std::string, SrsSource*>::iterator it; std::map<std::string, SrsSource*>::iterator it;
for (it = pool.begin(); it != pool.end();) { for (it = pool.begin(); it != pool.end();) {
SrsSource* source = it->second; SrsSource* source = it->second;
// Do cycle source to cleanup components, such as hls dispose.
if ((ret = source->cycle()) != ERROR_SUCCESS) { if ((ret = source->cycle()) != ERROR_SUCCESS) {
return ret; return ret;
} }
// TODO: FIXME: support source cleanup.
// @see https://github.com/ossrs/srs/issues/713
// @see https://github.com/ossrs/srs/issues/714
#if 0
// When source expired, remove it.
if (source->expired()) { if (source->expired()) {
int cid = source->source_id(); int cid = source->source_id();
if (cid == -1 && source->pre_source_id() > 0) { if (cid == -1 && source->pre_source_id() > 0) {
@ -832,6 +834,9 @@ int SrsSource::do_cycle_all()
} else { } else {
++it; ++it;
} }
#else
++it;
#endif
} }
return ret; return ret;

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 226 #define VERSION_REVISION 227
// generated by configure, only macros. // generated by configure, only macros.
#include <srs_auto_headers.hpp> #include <srs_auto_headers.hpp>