From efc3e78ba03ae5b93ea905c211af9139304a4e08 Mon Sep 17 00:00:00 2001 From: alexliyu7352 Date: Tue, 5 Apr 2022 19:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8emplace=5Fback=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81=20(#1542)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 少了一次构造调用,为什么不用呢? --- src/Record/HlsMaker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Record/HlsMaker.cpp b/src/Record/HlsMaker.cpp index be1c9f01..091667c0 100644 --- a/src/Record/HlsMaker.cpp +++ b/src/Record/HlsMaker.cpp @@ -137,7 +137,7 @@ void HlsMaker::flushLastSegment(bool eof){ if (seg_dur <= 0) { seg_dur = 100; } - _seg_dur_list.push_back(std::make_tuple(seg_dur, std::move(_last_file_name))); + _seg_dur_list.emplace_back(seg_dur, std::move(_last_file_name)); delOldSegment(); //先flush ts切片,否则可能存在ts文件未写入完毕就被访问的情况 onFlushLastSegment(seg_dur);