正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -1117,6 +1117,7 @@ int SrsHlsCache::reap_segment(string log_desc, SrsHlsMuxer* muxer, int64_t segme | @@ -1117,6 +1117,7 @@ int SrsHlsCache::reap_segment(string log_desc, SrsHlsMuxer* muxer, int64_t segme | ||
1117 | 1117 | ||
1118 | SrsHls::SrsHls() | 1118 | SrsHls::SrsHls() |
1119 | { | 1119 | { |
1120 | + _req = NULL; | ||
1120 | source = NULL; | 1121 | source = NULL; |
1121 | handler = NULL; | 1122 | handler = NULL; |
1122 | 1123 | ||
@@ -1137,6 +1138,7 @@ SrsHls::SrsHls() | @@ -1137,6 +1138,7 @@ SrsHls::SrsHls() | ||
1137 | 1138 | ||
1138 | SrsHls::~SrsHls() | 1139 | SrsHls::~SrsHls() |
1139 | { | 1140 | { |
1141 | + srs_freep(_req); | ||
1140 | srs_freep(codec); | 1142 | srs_freep(codec); |
1141 | srs_freep(sample); | 1143 | srs_freep(sample); |
1142 | srs_freep(jitter); | 1144 | srs_freep(jitter); |
@@ -1205,7 +1207,8 @@ int SrsHls::on_publish(SrsRequest* req) | @@ -1205,7 +1207,8 @@ int SrsHls::on_publish(SrsRequest* req) | ||
1205 | { | 1207 | { |
1206 | int ret = ERROR_SUCCESS; | 1208 | int ret = ERROR_SUCCESS; |
1207 | 1209 | ||
1208 | - _req = req; | 1210 | + srs_freep(_req); |
1211 | + _req = req->copy(); | ||
1209 | 1212 | ||
1210 | // update the hls time, for hls_dispose. | 1213 | // update the hls time, for hls_dispose. |
1211 | last_update_time = srs_get_system_time_ms(); | 1214 | last_update_time = srs_get_system_time_ms(); |
-
请 注册 或 登录 后发表评论