From patchwork Fri Apr 19 08:23:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Diego Felix de Souza via ffmpeg-devel X-Patchwork-Id: 12807 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id A026D448A4B for ; Fri, 19 Apr 2019 11:23:51 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C0166899DB; Fri, 19 Apr 2019 11:23:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E1106680CC5 for ; Fri, 19 Apr 2019 11:23:44 +0300 (EEST) Date: Fri, 19 Apr 2019 08:23:35 +0000 To: FFmpeg development discussions and patches Message-ID: In-Reply-To: <20190418200711.GY3501@michaelspb> References: <20190418101034.GW3501@michaelspb> <20190418200711.GY3501@michaelspb> Feedback-ID: Mx8CaiV20jk_fqXDN0fFpg3vRaGkb9VCTrYRnZNHwEija3aOdqvFspzl6ODkmHrlSKJSx29p-LzkuvS_96L02A==:Ext:ProtonMail MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch Subject: Re: [FFmpeg-devel] [PATCH] libavformat: fix inputs initialization in mpegts muxer with filters X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?UTF-8?Q?Andreas_H=C3=A5kon?= via ffmpeg-devel From: Diego Felix de Souza via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: =?UTF-8?Q?Andreas_H=C3=A5kon?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, 18 de April de 2019 22:07, Michael Niedermayer wrote: > > fails to apply cleanly > > Applying: libavformat: fix inputs initialization in mpegts muxer with filters > Using index info to reconstruct a base tree... > error: patch failed: fftools/ffmpeg.c:4613 > error: fftools/ffmpeg.c: patch does not apply > error: Did you hand edit your patch? > It does not apply to blobs recorded in its index. > Patch failed at 0001 libavformat: fix inputs initialization in mpegts muxer with filters > Sorry Michael another time! Here a new version from a clean copy. Regards. A.H. --- From 936740731c17a9757aa093bdb35d9772df1e64a8 Mon Sep 17 00:00:00 2001 From: Andreas Hakon Date: Fri, 19 Apr 2019 09:17:32 +0100 Subject: [PATCH] libavformat: input init mpegts with filters v2 This patch solves the initialization of the inputs when using filters (a graph filter) with the mpegts muxer. This bug seems to be generated by a simple forgetting to copy. The same code is repeated two times, but only in one case the variable inputs_done is initialized. Testcase: $ ffmpeg -f mpegts -i mpeg.ts \ -filter_complex "[i:100]fps=fps=25[out]" \ -map "[out]" -c:v libx264 -f mpegts out.ts Signed-off-by: Andreas Hakon --- fftools/ffmpeg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0f157d6..7399a19 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4613,8 +4613,10 @@ static int transcode_step(void) } if ((ret = transcode_from_filter(ost->filter->graph, &ist)) < 0) return ret; - if (!ist) + if (!ist) { + ost->inputs_done = 1; return 0; + } } else if (ost->filter) { int i; for (i = 0; i < ost->filter->graph->nb_inputs; i++) {