From patchwork Thu Feb 9 10:55:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 40335 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp324192pzk; Thu, 9 Feb 2023 02:56:21 -0800 (PST) X-Google-Smtp-Source: AK7set/sPs7ShIT7jZse041dBKdGEVBBr26Fiu9tPqm5lObrcKcSFJWXQi/jDXvOirQ8drfmL0c/ X-Received: by 2002:a17:907:8a03:b0:8aa:bdeb:83b5 with SMTP id sc3-20020a1709078a0300b008aabdeb83b5mr11437418ejc.18.1675940181625; Thu, 09 Feb 2023 02:56:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675940181; cv=none; d=google.com; s=arc-20160816; b=heK/kmB0xpD8QlpQYYXcG0ueig6JLAqB8g/H3RgVogbJdB4QZjStLVnEKUtcVKtBhP VTyJJRvxAwMgd7kLAetH9JdsrThILFvOf8DrZqg2viVOLwUC3LJpQvwAHal3xtxzaCgf 0X8GJ2aOCr9Bu9wa60CMVT/c+uRuWOEOWTEmk3rfB9W9lmDvuEcjLwe8mKbA7d1u2wWC Qd/nQA3RNumrfNYQHIz/N/2Euan0UpH+wp14hkgT6sTgdHF9T0qyAR0OUzNK4r3wFB9/ nKhVkMFHBNMlZg5mlkMvL3v4R1gOnehdqaF8rzirXuxiqjN+hENOrazgzNyJsauL9Q6E KOvA== 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=W57zGEYcyR2XBq5BI0gKawVJbE3A3oLSz2nvtLzmeR8=; b=rr8lP0+yoqhaI8dOMCyqrCTUaJPkaCvZzJYKc14/5Tj9ItMgKO1MzwWoiaUu5Fs3h7 hAwupJuHhn8N0zcfCxb8iwdrhYKH33xFzEjBQyvd8g7S2pEb7tXJisveY0B1jXhRS7re qOy4JCgSfx013H51ryCTCVpy0L7c73rvzVhw+U9hyhxiPOqMpIjzB2JA9DIdcZRP7crx j17P8h6wZR18FLE27jq6/a2lXIHi0L8j+PYCSInObwUBbsV6a/NBvhgr23e/Ra5RP10I JFgy3FgZIyL4CAQMvlQOu1NouNDCWj/zuRcgGDIcpghWgHhtqNlxvu6h94vv96zTOYv7 3HZA== 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 mr30-20020a170907829e00b00888c44d9d86si2048012ejc.508.2023.02.09.02.56.21; Thu, 09 Feb 2023 02:56:21 -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 6994D68BEB9; Thu, 9 Feb 2023 12:55:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 58F5868BE81 for ; Thu, 9 Feb 2023 12:55:52 +0200 (EET) Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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-102.mailbox.org (Postfix) with ESMTPS id 4PCDLF6STbz9scg for ; Thu, 9 Feb 2023 11:55:49 +0100 (CET) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Feb 2023 16:25:18 +0530 Message-Id: <20230209105519.1814-3-ffmpeg@gyani.pro> In-Reply-To: <20230209105519.1814-1-ffmpeg@gyani.pro> References: <20230209105519.1814-1-ffmpeg@gyani.pro> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: UEweM+iOLbxT --- libavformat/segment.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/segment.c b/libavformat/segment.c index 80e4bf851c..2d9f24e194 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, 0); + if (ret < 0) + av_log(s, AV_LOG_WARNING, "unable to transfer program %d to child muxer\n", s->programs[i]->id); + } + return 0; }