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

copy the request for hls.

This commit is contained in:
winlin 2015-06-02 12:56:04 +08:00
parent 679583dad6
commit 4e42b9c628

View file

@ -1117,6 +1117,7 @@ int SrsHlsCache::reap_segment(string log_desc, SrsHlsMuxer* muxer, int64_t segme
SrsHls::SrsHls() SrsHls::SrsHls()
{ {
_req = NULL;
source = NULL; source = NULL;
handler = NULL; handler = NULL;
@ -1137,6 +1138,7 @@ SrsHls::SrsHls()
SrsHls::~SrsHls() SrsHls::~SrsHls()
{ {
srs_freep(_req);
srs_freep(codec); srs_freep(codec);
srs_freep(sample); srs_freep(sample);
srs_freep(jitter); srs_freep(jitter);
@ -1205,7 +1207,8 @@ int SrsHls::on_publish(SrsRequest* req)
{ {
int ret = ERROR_SUCCESS; int ret = ERROR_SUCCESS;
_req = req; srs_freep(_req);
_req = req->copy();
// update the hls time, for hls_dispose. // update the hls time, for hls_dispose.
last_update_time = srs_get_system_time_ms(); last_update_time = srs_get_system_time_ms();