From patchwork Fri May 20 09:36:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35847 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:9992:b0:82:461d:f3b with SMTP id ve18csp500742pzb; Fri, 20 May 2022 02:37:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/paUaB7ZvSdJwyT2zSDgrvEWbA9H3zwC5ebA7My+ik6zxhAElc5gZAIrGV+b69JX5zW7E X-Received: by 2002:a05:6402:370c:b0:42a:adfa:9150 with SMTP id ek12-20020a056402370c00b0042aadfa9150mr9860960edb.57.1653039456280; Fri, 20 May 2022 02:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653039456; cv=none; d=google.com; s=arc-20160816; b=dqXf2CJDnNHs7/byCEKIHJ/LMg2KBFHXncQlxQuje/h6XS5a3kW31+sKht75MntY3n 8gOlYw5270+YWghVfMS7lo5I6K3+HaznhGE5ctl0nbHFJrfkOZZINEXk3D7VI2x1egvG K+imZdHDUWQe5Xyve5MRTwgeDzAWKkwAus2UwnK3SOj8SM6YSEGNK4RIiAszgHwLo3fy SIqaMER4ldbGU81uTNEOXs6bsHaS1XAwB37n4HQWwj4mJy4IH+6lH9JRgsGqdi79Y7PO 9ur6gudLE8G4wIsRYcn1VVpMWMgDLx3IBvGxn69gQaMNU+tDHvKpJ7a40YBmGT615K0W CVKQ== 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=rtad+ZiH1SRKYLLwLyS++WKOcCKNJQzN6wGnM6DBVrQ=; b=UPmTpTpito2RlAGTTp6rCzKFNQH9Ozf0Ipi2eqwem89xk1InEYQA1zxKGKchp2jT6t 24Cvr/f7vqbNv9WuV21WQz7qM85WzmWEKPAHjdPpTXFuMpSsV8RwxgNMfdhONMu8frmL CTSiP4wySLtp7qfLJZmPxnOr/DFxSCCfADopT0sUo/fMVz4RLoXM/G+oruhYYc87aKLi aeg2JZ1MfuR+ybe9LNVwE+35qcAti3U9MmttLxXBBe1HAa0NOJHGeZSNB1uZQXZByjzy jILLbKhpfW37C2NSgG3JqFzsYics/T1S1ztXonB0ARDxJ827aBuuq46h+2c0ilWEpz3W iXcw== 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 hr8-20020a1709073f8800b006fe9a52586esi5316373ejc.736.2022.05.20.02.37.35; Fri, 20 May 2022 02:37:36 -0700 (PDT) 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 CD2BB68B499; Fri, 20 May 2022 12:37:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8431F68B498 for ; Fri, 20 May 2022 12:37:08 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2FC9924017C for ; Fri, 20 May 2022 11:37:08 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id FduhtHafo4S7 for ; Fri, 20 May 2022 11:37:07 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 6AC8D24017E for ; Fri, 20 May 2022 11:37:06 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 65C853A06EC; Fri, 20 May 2022 11:37:04 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 May 2022 11:36:52 +0200 Message-Id: <20220520093653.26035-3-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220520093653.26035-1-anton@khirnov.net> References: <20220520093653.26035-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg: fix 2pass log file names 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: l9grxD6urMdE Use the global stream index rather than an unrelated variable in the filename. Broken in 6d5d9246042. --- fftools/ffmpeg_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 47e8b9b7bd..c719bc2d0a 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1867,7 +1867,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in snprintf(logfilename, sizeof(logfilename), "%s-%d.log", ost->logfile_prefix ? ost->logfile_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX, - i); + nb_output_streams - 1); if (!strcmp(ost->enc->name, "libx264")) { av_dict_set(&ost->encoder_opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE); } else {