diff --git a/README.md b/README.md index e344241d7..d9e8ee900 100755 --- a/README.md +++ b/README.md @@ -562,6 +562,7 @@ Supported operating systems and hardware: ### SRS 2.0 history +* v2.0, 2015-05-23, fix [#391](https://github.com/simple-rtmp-server/srs/issues/391) copy request for async call. * v2.0, 2015-05-22, fix [#397](https://github.com/simple-rtmp-server/srs/issues/397) the USER_HZ maybe not 100. 2.0.165 * v2.0, 2015-05-22, for [#400](https://github.com/simple-rtmp-server/srs/issues/400), parse when got entire http header, by feilong. 2.0.164. * v2.0, 2015-05-19, merge from bravo system, add the rtmfp to bms(commercial srs). 2.0.163. diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index 10725fe75..fdd4878d0 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -498,12 +498,13 @@ int SrsFlvSegment::on_reload_vhost_dvr(std::string /*vhost*/) SrsDvrAsyncCallOnDvr::SrsDvrAsyncCallOnDvr(SrsRequest* r, string p) { - req = r; + req = r->copy(); path = p; } SrsDvrAsyncCallOnDvr::~SrsDvrAsyncCallOnDvr() { + srs_freep(req); } int SrsDvrAsyncCallOnDvr::call() diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index cf322b22b..b850e3084 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -172,7 +172,7 @@ void SrsHlsSegment::update_duration(int64_t current_frame_dts) SrsDvrAsyncCallOnHls::SrsDvrAsyncCallOnHls(SrsRequest* r, string p, string t, string m, string mu, int s, double d) { - req = r; + req = r->copy(); path = p; ts_url = t; m3u8 = m; @@ -183,6 +183,7 @@ SrsDvrAsyncCallOnHls::SrsDvrAsyncCallOnHls(SrsRequest* r, string p, string t, st SrsDvrAsyncCallOnHls::~SrsDvrAsyncCallOnHls() { + srs_freep(req); } int SrsDvrAsyncCallOnHls::call() @@ -221,12 +222,13 @@ string SrsDvrAsyncCallOnHls::to_string() SrsDvrAsyncCallOnHlsNotify::SrsDvrAsyncCallOnHlsNotify(SrsRequest* r, string u) { - req = r; + req = r->copy(); ts_url = u; } SrsDvrAsyncCallOnHlsNotify::~SrsDvrAsyncCallOnHlsNotify() { + srs_freep(req); } int SrsDvrAsyncCallOnHlsNotify::call()