From c510f3765a8a5ae9ac1ace4fc7c7b4ecf41dbdad Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 11 Feb 2022 14:02:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=B0=8F=E6=96=87=E4=BB=B6mm?= =?UTF-8?q?ap=E9=A2=84=E5=8A=A0=E8=BD=BD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpBody.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Http/HttpBody.cpp b/src/Http/HttpBody.cpp index ce6fa2f7..63e632eb 100644 --- a/src/Http/HttpBody.cpp +++ b/src/Http/HttpBody.cpp @@ -115,6 +115,7 @@ static std::shared_ptr getSharedMmap(const string &file_path, int64_t &fil delSharedMmap(file_path, ptr); }); +#if 0 if (file_size < 10 * 1024 * 1024 && file_path.rfind(".ts") != string::npos) { //如果是小ts文件,那么尝试先加载到内存 auto buf = BufferRaw::create(); @@ -123,6 +124,7 @@ static std::shared_ptr getSharedMmap(const string &file_path, int64_t &fil delSharedMmap(file_path, ptr); }); } +#endif { lock_guard lck(s_mtx); s_shared_mmap[file_path] = std::make_tuple(ret.get(), file_size, ret);