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 A7C3B43709 for ; Sat, 25 Jun 2022 15:15:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 18FBE68B7CC; Sat, 25 Jun 2022 18:15:01 +0300 (EEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3ABC868B7B1 for ; Sat, 25 Jun 2022 18:14:54 +0300 (EEST) Received: by mail-pf1-f171.google.com with SMTP id p14so5082269pfh.6 for ; Sat, 25 Jun 2022 08:14:54 -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=Qe9BFiclTnsVM+6QDKQCor43EleNW9DwfJVECc0JQi8=; b=LZplcInP/8GENGH+RYzYdMJkCjy51d0VMU0srO3w5hX1etEL/KwYeEblYpHETw6Sj0 JNc9lHXJlrhLfJDpdP4G8bewJ7BbYEZUlTRWy2YSlkQFR3SB5pua8DvovUGjfSWto1z5 xykUPSTQJ6UbkrqpNp6sC046FzzrF/Vfxe2FSUxoUz4xSQ0CNV+6fIv4BB/etB4LHc2O IF/1jE4qNCGF4m0flmtCIadMCjSF2tL9E7fojR8m4ofUeaK3xMyIFaABeF7yWQAwfmNT SNMDHbPMZM5yKwNCdJjUdguMVoYZ4Nbf11Qm/Gs7pDuD0APOk1DWGH/wzZmznDHXpZTI YOig== 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=Qe9BFiclTnsVM+6QDKQCor43EleNW9DwfJVECc0JQi8=; b=emQH2oOPP/Q3OuarJHJyhyj1Q4rukB8/bCQdxs9lbkA4KmfTC8GQorSlH/pS7TgWkn FtT0yEgJrZByuS/JNEu9Aee3kdQoatCxfwig18ZjTm+KdX7xW+IxWLHRbDaXCgfrZDbo Tur9pKddxMjoXCylqkqlCg+wUfWoVSzQr5rmaaBt4wPkmt2TtmZTbyqypzsyr4g0nXxC 8Pw4zaYDBYhBiMZP3ImyROSvgM6Ie6c7z1j89mHJ4BnWPzR+3YPa83aojvKjnSUBRj+z x0fRoTG20jGWPiBvk1ILRscW1Zg5eUoj/ZZyXu9XrEYcBFbnYsn7Tx+GD0WLt1ZwgCYc AwYw== X-Gm-Message-State: AJIora/7qdRsQLTAuY4Grnfuwi/pX+2+gDo87ZpDByULP0yDYyKHo+OS K1gVBwx7bL/+mjxXn5LG87gnv/EOHkg= X-Google-Smtp-Source: AGRyM1uOcepVxv+1uwYq8772CAXZw52/0hhqqjmcS9ejEXMAr2vLGv8GLNEcZ/xq34akCvD15wwX5w== X-Received: by 2002:a63:8149:0:b0:40d:2afb:c02 with SMTP id t70-20020a638149000000b0040d2afb0c02mr4145081pgd.274.1656170092249; Sat, 25 Jun 2022 08:14:52 -0700 (PDT) Received: from localhost.localdomain (93.179.115.217.16clouds.com. [93.179.115.217]) by smtp.gmail.com with ESMTPSA id x124-20020a626382000000b00525231e15ccsm3774077pfb.113.2022.06.25.08.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jun 2022 08:14:52 -0700 (PDT) From: huheng To: ffmpeg-devel@ffmpeg.org Date: Sat, 25 Jun 2022 23:14:33 +0800 Message-Id: <20220625151433.83031-1-heng.hu.1989@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformat/hlsenc.c resend headers when generate a new segment in single_file 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: huheng 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3bafddfa61..ee5c5afe56 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2631,6 +2631,11 @@ 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 (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".