From patchwork Thu Feb 9 10:55:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 40336 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp324271pzk; Thu, 9 Feb 2023 02:56:30 -0800 (PST) X-Google-Smtp-Source: AK7set/fQGM1LcneBFOZU8IuLo8YZlpJ7N/JUniMxfx09yTuAwaOW5lBqO0hr6+PATr0wgaKnnxH X-Received: by 2002:a17:907:6d8a:b0:88f:8a5:b4cd with SMTP id sb10-20020a1709076d8a00b0088f08a5b4cdmr15084363ejc.1.1675940190693; Thu, 09 Feb 2023 02:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675940190; cv=none; d=google.com; s=arc-20160816; b=NneZmsaJlkGzA95rLZRailDlYbEGJ5aoou3p6sMweJilUwISurIIAfvUrHt9jUfzDu NiGLe8V5sRqvhEL8fAUAObpskTdhyxgflt+/ySZC4NAYOtWjeRQl4iJ4APZuZ/eMluB3 r1wQx60XXEKe7+d9Q2xMGBw1o8fi7/A1h8ILtUofGgb50B3QQPgxOLEHLvCmPksj1KOy 9TBJyotWp8XtBrNFuVN3M3aMlf5kEA4yWMDrE9Y/1xItNnZLhVXKjWax9AFEPbRIEcRh +MundVPi9NDWdc9SiWEkBdRXj1QVadBgOcAhNagZskCW6TMdt7Gg/nbhKUFchRlY+Hs7 FBkg== 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=g5VPnq9VebGyPRlgFgY72Pu6c8VYuuoQp2H5Jbv0HB4=; b=WByqhcK12ShVGT4mteaezv5hAzERtGHzg3knXox0o4SvLnoJ4ltxT1e4Q9jflKDdug gXPkfcCBgbnWMkNxLht+12N7L3NvYhNqDd5FFSzHY8cyqNj4o2WRvBf9184Dryj419pS 3MMctgsOupUqBIpA+tZbEkGu26EKhBwVWWaStA+QsgJ/bTfjiGTZpZJHJYcKo3B74/+U QihIpac95+VC7AeBv8xKBNyIJ5GNNZENtDMhci4iWynX2HEnQTKXSZEMzeNSodKscP/3 HnL321RYFfrzCZQqlcC/tF+9HpWuWgzMwHP8nTT9VlBWLab8zcmDpcIubezHksnJJG/f MPRw== 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 17-20020a170906001100b0078dbd939dacsi2306046eja.545.2023.02.09.02.56.30; Thu, 09 Feb 2023 02:56:30 -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 63C0F68BEC9; Thu, 9 Feb 2023 12:56:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9882468BEC5 for ; Thu, 9 Feb 2023 12:55:53 +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-101.mailbox.org (Postfix) with ESMTPS id 4PCDLH13gvz9sc7 for ; Thu, 9 Feb 2023 11:55:51 +0100 (CET) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Feb 2023 16:25:19 +0530 Message-Id: <20230209105519.1814-4-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 4/4] avformat/tee: 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: lXK8RDHlM/gT --- libavformat/tee.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/tee.c b/libavformat/tee.c index dd408dd096..2fde8a3828 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -291,6 +291,12 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave) } } + for (i = 0; i < avf->nb_programs; i++) { + ret = av_program_copy(avf2, avf, avf->programs[i]->id, 0); + if (ret < 0) + av_log(avf, AV_LOG_WARNING, "unable to transfer program %d to child muxer\n", avf->programs[i]->id); + } + ret = ff_format_output_open(avf2, filename, &options); if (ret < 0) { av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,