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

use hls->initialize to set req of hls (#1077)

This commit is contained in:
RocFang 2018-02-28 13:35:33 +08:00 committed by winlin
parent 1721e4ea4b
commit fd016ed91a
3 changed files with 6 additions and 7 deletions

View file

@ -1205,10 +1205,13 @@ int SrsHls::cycle()
return ret;
}
int SrsHls::initialize(SrsSource* s)
int SrsHls::initialize(SrsSource* s, SrsRequest* r)
{
int ret = ERROR_SUCCESS;
srs_assert(!_req);
_req = r->copy();
source = s;
if ((ret = muxer->initialize()) != ERROR_SUCCESS) {
@ -1222,9 +1225,6 @@ int SrsHls::on_publish(SrsRequest* req, bool fetch_sequence_header)
{
int ret = ERROR_SUCCESS;
srs_freep(_req);
_req = req->copy();
// update the hls time, for hls_dispose.
last_update_time = srs_get_system_time_ms();