From patchwork Tue Feb 4 21:39:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 17688 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0C83344088E for ; Tue, 4 Feb 2020 23:39:38 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DCEDA688391; Tue, 4 Feb 2020 23:39:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B5E86882E5 for ; Tue, 4 Feb 2020 23:39:31 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 3BC4DE3F9D; Tue, 4 Feb 2020 22:39:31 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XjvSPvxSCbPJ; Tue, 4 Feb 2020 22:39:29 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 239FBE35FF; Tue, 4 Feb 2020 22:39:29 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 4 Feb 2020 22:39:23 +0100 Message-Id: <20200204213923.21382-1-cus@passwd.hu> X-Mailer: git-send-email 2.16.4 Subject: [FFmpeg-devel] [PATCH] avformat/hlsenc: allow a custom SDT and PAT period X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The default is not to write SDT and PAT periodically, only in the beginning of every segment. After this patch the user might override this if needed. Signed-off-by: Marton Balint --- libavformat/hlsenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 87b861d437..f6dd894343 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -861,8 +861,8 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs) /* We only require one PAT/PMT per segment. */ char period[21]; snprintf(period, sizeof(period), "%d", (INT_MAX / 2) - 1); - av_dict_set(&options, "sdt_period", period, 0); - av_dict_set(&options, "pat_period", period, 0); + av_dict_set(&options, "sdt_period", period, AV_DICT_DONT_OVERWRITE); + av_dict_set(&options, "pat_period", period, AV_DICT_DONT_OVERWRITE); } ret = avformat_init_output(oc, &options); remaining_options = av_dict_count(options);