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 EEC94432A0 for ; Mon, 27 Jun 2022 13:31:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C192D68B8BA; Mon, 27 Jun 2022 16:31:04 +0300 (EEST) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09D5768B78F for ; Mon, 27 Jun 2022 16:30:58 +0300 (EEST) Received: by mail-pj1-f41.google.com with SMTP id c6-20020a17090abf0600b001eee794a478so1802673pjs.1 for ; Mon, 27 Jun 2022 06:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nB6vYF+2/IPbMraKhtJLD9SfV2oylCm4apjyqwq8fMY=; b=PmNzUKcapiPxJrc73V5yTTiwHBAA+696dh/NEQIDqbPtRwUiY34iD/758CLK62GIme 3+aMaQiotxb9Je8sPDhsFy/A1V82jjMeJ+L2QJRVf+xTYduXafZI2Wk7up6DATj8V2/e vs0t4c//bHV13LPGk7a0P3l2NTaMqhJwFHcK8Yi/tcN5lKhAOdu02vX2bkJ/v/rK8KZf 0UqkIxj6yrqide/NHqdDZa7GL0kjr1qGFkxHbg7dkH0j9flznWM6a70S6DS0qpXu7/ca FYaXv9THopjucuhvu94iWItUbPrF/pksNVZlg92/bA+O7cpnU25Mmivesc2BSYlW4mCi Bp9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nB6vYF+2/IPbMraKhtJLD9SfV2oylCm4apjyqwq8fMY=; b=3f32DR9bgcwcAce1BWaLjI1uHRLiMljesHc7on4tMJYvesGtS60MqpJR/8/ipjkA9W FPlNN4aku5QA+r0IMAU2+83B6ox83Mqn2ryaazV42juSYPLI6wSD9MUUhCLiEY+EtiCv CFlPHW8u2I84ulm3yH//jiISxwFvohs7h7kVZBfi+KbHdh011Yt8VCHNnsakLRYsl+s/ QfiR7Q3bV7SRb2v+zyWRX1zknnzMTA/tDXUl8+Uu91tgAHaM2V7DcfDR3y0WhVS3m2o9 IHtJ9aodfhwJhDxedEFUXJ99bG7/wepo4fja3FnbtI6PVVXgPc3KSHhbn2vRhjllgQvU Y3Hg== X-Gm-Message-State: AJIora9AW45+9/msFGt3+WaUQfDpjeMt0UTJDzwKJqFKvVRla+AhHc7A MZYX9x9NfMoqK17Z6gHbd2V2PVJqMxg= X-Google-Smtp-Source: AGRyM1sOTxbAYiGTVin1BZqRF/Z4wQuZQKd11zjvgExsEEMLQ2Ps370OS8hoVRIag8GNgOskF2dJog== X-Received: by 2002:a17:902:e1d1:b0:16a:1748:19a8 with SMTP id t17-20020a170902e1d100b0016a174819a8mr14435268pla.80.1656336656270; Mon, 27 Jun 2022 06:30:56 -0700 (PDT) Received: from localhost.localdomain (93.179.115.217.16clouds.com. [93.179.115.217]) by smtp.gmail.com with ESMTPSA id n5-20020a170902d2c500b0015e9f45c1f4sm7225021plc.186.2022.06.27.06.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 06:30:55 -0700 (PDT) From: huheng To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 Jun 2022 21:30:11 +0800 Message-Id: <20220627133011.57715-1-heng.hu.1989@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1] avformat/hlsenc: Add resend_headers option 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: huheng , lingjiujianke@gmail.com 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: Add pat and pmt table at start of each segment in single_file mode enhanced compatibility of hls stream. Because some hls clients separate parsing segment of hls stream, the absence of pat/pmt will cause parsing to fail. Signed-off-by: huheng --- libavformat/hlsenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3bafddfa61..d18178e727 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2631,6 +2631,9 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) vs->start_pos += vs->size; if (hls->key_info_file || hls->encrypt) ret = hls_start(s, vs); + if (hls->segment_type == SEGMENT_TYPE_MPEGTS && oc->oformat->priv_class && oc->priv_data) { + av_opt_set(oc->priv_data, "mpegts_flags", "resend_headers", 0); + } } else if (hls->max_seg_size > 0) { if (vs->size + vs->start_pos >= hls->max_seg_size) { vs->sequence++; -- 2.36.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".