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 6E7A440BC2 for ; Sun, 8 May 2022 00:55:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 329C568B361; Sun, 8 May 2022 03:55:28 +0300 (EEST) Received: from smtpbg.qq.com (smtpbg139.qq.com [175.27.65.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 43FE368B0F2 for ; Sun, 8 May 2022 03:55:19 +0300 (EEST) X-QQ-mid: bizesmtp89t1651971314tu62bixv Received: from localhost ( [114.245.19.167]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 08 May 2022 08:55:13 +0800 (CST) X-QQ-SSF: 01100000002000Z0Z000000A0000000 X-QQ-FEAT: dpyQmELDBxF8mFTSkHffqQRdLSN7Hle1VZPHfOM0hGe48ucC7U3det/xMawze CSbwb4wNLTXeArRniq0dpI/vcbLjdYRlpZP47rIRgsdyZBKq0+W1Z1o1GLS9wYSgggb+aDO m9jK+V6wXY5SHwsoTobvwCLT/z/VepCdGhfIWpBlqGvW83StCfAsUPF2yhryzUCvOWe651T Cv+y+jrvizok0xA6MqA3JD06ZjRzZMTWJ9xtS6OPcngOddE8FPCOSH/vY8hHlheyaSescUC N01G8jI5OguFbet2g4ws/WvR+BcypHXE1ODW1AxmJu/ayDZ48rscOsGPi34JOyZwnpSf0BY ocQSzho X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 May 2022 08:54:17 +0800 Message-Id: <20220508005418.1270-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:qybgspam:qybgspam6 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/hlsenc: check option before set discont_program_date_time 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: fix ticket: 9238 There should check option flags with HLS_PROGRAM_DATE_TIME before set discont_program_date_time. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d2b8215dff..d91c7ebcb7 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1288,8 +1288,10 @@ static int parse_playlist(AVFormatContext *s, const char *url, VariantStream *vs new_start_pos = avio_tell(vs->avf->pb); vs->size = new_start_pos - vs->start_pos; ret = hls_append_segment(s, hls, vs, vs->duration, vs->start_pos, vs->size); - vs->last_segment->discont_program_date_time = discont_program_date_time; - discont_program_date_time += vs->duration; + if (hls->flags & HLS_PROGRAM_DATE_TIME) { + vs->last_segment->discont_program_date_time = discont_program_date_time; + discont_program_date_time += vs->duration; + } if (ret < 0) goto fail; vs->start_pos = new_start_pos; -- 2.34.1 _______________________________________________ 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".