正在显示
2 个修改的文件
包含
11 行增加
和
2 行删除
| @@ -204,6 +204,7 @@ Please select your language: | @@ -204,6 +204,7 @@ Please select your language: | ||
| 204 | 204 | ||
| 205 | ### V2 changes | 205 | ### V2 changes |
| 206 | 206 | ||
| 207 | +* v2.0, 2017-01-11, fix [#736][bug #736], recovery the hls dispose. 2.0.227 | ||
| 207 | * v2.0, 2017-01-10, refine hls html5 video template. | 208 | * v2.0, 2017-01-10, refine hls html5 video template. |
| 208 | * v2.0, 2017-01-10, fix [#635][bug #635], hls support NonIDR(open gop). 2.0.226 | 209 | * v2.0, 2017-01-10, fix [#635][bug #635], hls support NonIDR(open gop). 2.0.226 |
| 209 | * v2.0, 2017-01-06, for [#730][bug #730], reset ack follow flash player rules. 2.0.225 | 210 | * v2.0, 2017-01-06, for [#730][bug #730], reset ack follow flash player rules. 2.0.225 |
| @@ -800,8 +800,6 @@ int SrsSource::cycle_all() | @@ -800,8 +800,6 @@ int SrsSource::cycle_all() | ||
| 800 | { | 800 | { |
| 801 | int ret = ERROR_SUCCESS; | 801 | int ret = ERROR_SUCCESS; |
| 802 | 802 | ||
| 803 | - // TODO: FIXME: support source cleanup. | ||
| 804 | - // @see https://github.com/ossrs/srs/issues/714 | ||
| 805 | int cid = _srs_context->get_id(); | 803 | int cid = _srs_context->get_id(); |
| 806 | ret = do_cycle_all(); | 804 | ret = do_cycle_all(); |
| 807 | _srs_context->set_id(cid); | 805 | _srs_context->set_id(cid); |
| @@ -816,10 +814,17 @@ int SrsSource::do_cycle_all() | @@ -816,10 +814,17 @@ int SrsSource::do_cycle_all() | ||
| 816 | std::map<std::string, SrsSource*>::iterator it; | 814 | std::map<std::string, SrsSource*>::iterator it; |
| 817 | for (it = pool.begin(); it != pool.end();) { | 815 | for (it = pool.begin(); it != pool.end();) { |
| 818 | SrsSource* source = it->second; | 816 | SrsSource* source = it->second; |
| 817 | + | ||
| 818 | + // Do cycle source to cleanup components, such as hls dispose. | ||
| 819 | if ((ret = source->cycle()) != ERROR_SUCCESS) { | 819 | if ((ret = source->cycle()) != ERROR_SUCCESS) { |
| 820 | return ret; | 820 | return ret; |
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | + // TODO: FIXME: support source cleanup. | ||
| 824 | + // @see https://github.com/ossrs/srs/issues/713 | ||
| 825 | + // @see https://github.com/ossrs/srs/issues/714 | ||
| 826 | +#if 0 | ||
| 827 | + // When source expired, remove it. | ||
| 823 | if (source->expired()) { | 828 | if (source->expired()) { |
| 824 | int cid = source->source_id(); | 829 | int cid = source->source_id(); |
| 825 | if (cid == -1 && source->pre_source_id() > 0) { | 830 | if (cid == -1 && source->pre_source_id() > 0) { |
| @@ -835,6 +840,9 @@ int SrsSource::do_cycle_all() | @@ -835,6 +840,9 @@ int SrsSource::do_cycle_all() | ||
| 835 | } else { | 840 | } else { |
| 836 | ++it; | 841 | ++it; |
| 837 | } | 842 | } |
| 843 | +#else | ||
| 844 | + ++it; | ||
| 845 | +#endif | ||
| 838 | } | 846 | } |
| 839 | 847 | ||
| 840 | return ret; | 848 | return ret; |
-
请 注册 或 登录 后发表评论