From patchwork Tue Feb 7 14:58:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 40317 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp4383065pzk; Tue, 7 Feb 2023 06:59:54 -0800 (PST) X-Google-Smtp-Source: AK7set8aNPbO4LURLFsGViKNi2jPKJdX2q4PCJ+ovDItnsTQcv2Q1rjXrA+8DsO7X5cienrRvdu3 X-Received: by 2002:a17:906:b085:b0:878:78f9:d1be with SMTP id x5-20020a170906b08500b0087878f9d1bemr3498524ejy.23.1675781993891; Tue, 07 Feb 2023 06:59:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675781993; cv=none; d=google.com; s=arc-20160816; b=z5Ny4/QKFAqF5FZBmlJZtwKgLfqRCnLH0U9kMYCpQkjusBo3arQQQ7xv2BdPog4ilt IJWvyo5VN9cP65LD2HaiCSN9pamHdSG3qcoeQaCGieorbO2JkoEgsmuxtuCtLkNUSh3T vMvJbKfgVpIN6f36lZGMUf7CgVFQAkhmILodsb2Z3WiszUnhZ/gvFXX2uMr3kdBkRl78 8n0wce3ofXnHX6k5vk2E8buPggIuunDqIb84zsT/067MrEGRN8UTzJw+wM1t1rsC1fOw uCVcuJR/GZq8lTDiZcQvrF8SWN0XKjrTZP1kb5Lckty6FUhCidOWRG3zfo+cvnYHsa9w rSJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=okdUUmVzXG4XCht8BXWQo7lMzcLL//bVb8w5iWcIG9w=; b=Kh2Y9dt8NCXFJ5KPBRKbUuzzWFS5qhboc6JTujj5/4A/XSxWjgGwh3Hln3IuDiT7pj qlM0HiXYty+REPJ7+DEmtu9t/jJpXSzY1yPPvUjP9zTJ+vFur7KzLGFabqkUrJ9/gI2s GDBk1e+S7Nm8d2eXJZ6S5KqvDWrMpVCXWnnES0HKZwxX+hvKfMnIjXp4/erldBaN5EOK tu+n/DWgLSuaqeMAaCXYKXzgXC3NyeTIgvE44oDQl6wDvISHnfl/+dN01+JvRbcHtNwi f2T05I2u1fRCoFNSrdzWCh3o5NeoUrl+nHgeGEOfYFxhUgr4lwJgJXRZz2Q5IbcDlFO0 ncUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id mr42-20020a17090782aa00b00888161349d2si16878572ejc.203.2023.02.07.06.59.53; Tue, 07 Feb 2023 06:59:53 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1A91C68BE21; Tue, 7 Feb 2023 16:59:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B15C768B556 for ; Tue, 7 Feb 2023 16:59:25 +0200 (EET) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PB5rC1Lqvz9sb9 for ; Tue, 7 Feb 2023 15:59:23 +0100 (CET) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Feb 2023 20:28:49 +0530 Message-Id: <20230207145850.25485-3-ffmpeg@gyani.pro> In-Reply-To: <20230207145850.25485-1-ffmpeg@gyani.pro> References: <20230207145850.25485-1-ffmpeg@gyani.pro> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] avformat/segment: relay programs to child muxers 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: VS9hjIjuwWXI --- libavformat/segment.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/segment.c b/libavformat/segment.c index 80e4bf851c..a5acc28dfd 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -182,6 +182,12 @@ static int segment_mux_init(AVFormatContext *s) } } + for (i = 0; i < s->nb_programs; i++) { + ret = av_program_copy(oc, s, s->programs[i]->id); + if (ret < 0) + av_log(s, AV_LOG_WARNING, "unable to transfer program %d to child muxer\n", s->programs[i]->id); + } + return 0; }