From 9b6ee8131baeb10d7d860c54fb0fcb1cf1962d62 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 29 Nov 2019 11:59:39 +0800 Subject: [PATCH] =?UTF-8?q?hls=E7=94=A8=E4=BD=9C=E7=82=B9=E6=92=AD?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=82=A3=E4=B9=88m3u8=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E8=AE=B0=E5=BD=95=E4=B8=BA=E7=82=B9=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MediaFile/HlsMaker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MediaFile/HlsMaker.cpp b/src/MediaFile/HlsMaker.cpp index 3788f139..8c5b2994 100644 --- a/src/MediaFile/HlsMaker.cpp +++ b/src/MediaFile/HlsMaker.cpp @@ -110,8 +110,8 @@ void HlsMaker::addNewSegment(uint32_t) { return; } - //关闭并保存上一个切片 - flushLastSegment(); + //关闭并保存上一个切片,如果_seg_number==0,那么是点播。 + flushLastSegment(_seg_number == 0); //新增切片 _last_file_name = onOpenSegment(_file_index++); //重置切片计时器