From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5F2A343D85 for ; Fri, 9 Dec 2022 04:46:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 880C468BAF5; Fri, 9 Dec 2022 06:46:28 +0200 (EET) Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.67.158]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A8D5F68B460 for ; Fri, 9 Dec 2022 06:46:20 +0200 (EET) X-QQ-mid: bizesmtp85t1670561102to5flgku Received: from localhost ( [114.245.80.70]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 09 Dec 2022 12:45:01 +0800 (CST) X-QQ-SSF: 01100000000000Z0Z000000A0000000 X-QQ-FEAT: 5q30pvLz2ifedZEhW+7gYUxivPkpmhMEqhXMPQ8cP4MsPEN2Oq4aGZK0kzqIF rXIsgu9pjkXrBa4JiyBxs54n8GxQ/WoeXGUL4934hh4/FpZ2uvAmEyu5Kumgf6V8S+gKdn4 fmZwxf8DCCarWMDsyPdSE5D11g3uKSO3UY806cT8qshW05wA76Z3HEt/N3HiibnPDnqlt0h e+J6qwIeeUquLFJREqEghWEz4RQMPekvglw+deYmhwT02HhF3v3C5aFiJ7AlAsxpAo0Vef+ 1UFgr+mTkYGrDk+rnshJqxCOR/7w5tYIT1l6LnXy0DYh/WrFDob1AYjeXAvFHyg2xnvAl1a DFa+hubR4OHHreZ+h8= X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Dec 2022 12:37:36 +0800 Message-Id: <20221209043736.29531-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybglogicsvr:qybglogicsvr2 Subject: [FFmpeg-devel] [PATCH] avformat/hlsenc: hls_init_time should used in living stream mode X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Steven Liu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: When hls_init_time should available when hls_list_size > 0. Because the list will not refresh new top line segment when hls_list_size is 0 Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index a86fc8907f..25107d5f1c 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2938,7 +2938,7 @@ static int hls_init(AVFormatContext *s) av_log(hls, AV_LOG_DEBUG, "start_number evaluated to %"PRId64"\n", hls->start_sequence); } - hls->recording_time = hls->init_time ? hls->init_time : hls->time; + hls->recording_time = hls->init_time && hls->max_nb_segments > 0 ? hls->init_time : hls->time; if (hls->flags & HLS_SPLIT_BY_TIME && hls->flags & HLS_INDEPENDENT_SEGMENTS) { // Independent segments cannot be guaranteed when splitting by time -- 2.29.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".