From 7d76a3eb9b3952d04c9d634311655cf4ab6c7ae8 Mon Sep 17 00:00:00 2001 From: "Weiwei.Zhou" Date: Fri, 11 Oct 2019 16:16:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhls=E9=A6=96=E4=B8=AA?= =?UTF-8?q?=E5=88=87=E7=89=87=E5=BB=B6=E8=BF=9F=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MediaFile/HlsMaker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaFile/HlsMaker.cpp b/src/MediaFile/HlsMaker.cpp index a7faa643..c067be0b 100644 --- a/src/MediaFile/HlsMaker.cpp +++ b/src/MediaFile/HlsMaker.cpp @@ -103,7 +103,7 @@ void HlsMaker::delOldFile() { void HlsMaker::addNewFile(uint32_t) { _stampInc = _ticker.elapsedTime(); - if (_stampInc >= _seg_duration * 1000) { + if (_file_index == 0 || _stampInc >= _seg_duration * 1000) { _ticker.resetTime(); auto file_name = onOpenFile(_file_index); if (_file_index++ > 0) {