From 30b1759aa914a9476e49d90cb87fcd8740f3d6c8 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 7 Feb 2015 18:01:12 +0800 Subject: [PATCH] fix bug for memory hls. --- trunk/src/app/srs_app_http_conn.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_http_conn.cpp b/trunk/src/app/srs_app_http_conn.cpp index 304da8cf2..e96c9908a 100644 --- a/trunk/src/app/srs_app_http_conn.cpp +++ b/trunk/src/app/srs_app_http_conn.cpp @@ -877,7 +877,11 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) { int ret = ERROR_SUCCESS; - srs_assert(hls.find(r->vhost) != hls.end()); + // when no hls mounted, ignore. + if (hls.find(r->vhost) == hls.end()) { + return ret; + } + SrsHlsEntry* entry = hls[r->vhost]; srs_assert(entry); @@ -915,7 +919,11 @@ int SrsHttpServer::hls_update_ts(SrsRequest* r, string uri, string ts) { int ret = ERROR_SUCCESS; - srs_assert(hls.find(r->vhost) != hls.end()); + // when no hls mounted, ignore. + if (hls.find(r->vhost) == hls.end()) { + return ret; + } + SrsHlsEntry* entry = hls[r->vhost]; srs_assert(entry);