From patchwork Tue Jan 11 09:58:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33222 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp3547013iog; Tue, 11 Jan 2022 02:02:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1dNfwyyzd43rBTAwnvsqr4I8Dtod8FT5M2yRjkiGJlD9aQzrIDYqFYYNTX8MJFQiRtNch X-Received: by 2002:a17:907:6d9f:: with SMTP id sb31mr3057595ejc.56.1641895345308; Tue, 11 Jan 2022 02:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641895345; cv=none; d=google.com; s=arc-20160816; b=T6Wzn9rOPKY5KFubO3ryQg7l884ng/9BnDFbZgcU4RobPftJCvmjASWD0DQSh3w+D4 Br3hiHRvSJYJfRGXiopncS6kWBIrm4jel1FxRA3StmAqZ4BmaVZcJOQZ9z6hCTfOpG++ V9dR6xwMVoarVa1uOYYJ63G0m92kmEZSSoZg6cGkqdLWJpZJ/UxwngNdNFGAbeS1F2eO gzgY+U6rUmem5JDbdOxpTmgwATE9m7tcGGH9lIyfRWsGog8xDUyMmMrm229UutJ2IKIR cGTMhB0eGyli85FFotyV5nZ1eNE4AzpRWEWXWAlL+IaKqNRo/Mv1hizTnl03tI2JN+/q 5wuQ== 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=BbBaChJqTbIfTaIPgLq5av/Yn+JrIrbzKsUcZM5ckG0=; b=N0HC/geE+iSP2F7fVeRin8g974puHx531xugV76wIBnTMKIrUAm+OXgfWZ/Y3g4Lhq mYob4ZgePlcHNwRrWHvvplelxwYCBchQKYDnfgT1PnBnbDL0+nLTkmiQPgrxZcbUlUz4 wCK9W904wF2/X998Vzw1DzKH7LNRvR6Hl3B5YDjZGSm0/OOQjZGwKe0RJZuFxgoSelyW T4VG5g55I778FOAnBgg7yAX0Gzvn5t9/J/QwAGfXGm636nvFysQ83kTi1IF4syng8ueW 8mScwgFRxUsN1vYVgr0Y/4boDfu71Pz5NMKKyyz+KiDzpzWl0CTsz2L8yeaTRwQq4RFt qhqg== 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 i22si5449641ejw.616.2022.01.11.02.02.25; Tue, 11 Jan 2022 02:02:25 -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 B618568AFEF; Tue, 11 Jan 2022 11:59:28 +0200 (EET) 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 E096B68AF55 for ; Tue, 11 Jan 2022 11:59:14 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id CD706240687 for ; Tue, 11 Jan 2022 10:59:13 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 7LTEqBfH1Tmr for ; Tue, 11 Jan 2022 10:59:13 +0100 (CET) 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 EE3E3240690 for ; Tue, 11 Jan 2022 10:59:02 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 483CA3A0DA3; Tue, 11 Jan 2022 10:59:02 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 11 Jan 2022 10:58:29 +0100 Message-Id: <20220111095830.31542-27-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220111095830.31542-1-anton@khirnov.net> References: <20220111095830.31542-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 27/28] ffmpeg_mux: merge variable declaration and initialization 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: +QTz0vKfc+Px --- fftools/ffmpeg_mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 54020880eb..21771b3ae6 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -58,7 +58,7 @@ static int want_sdp = 1; static void do_video_stats(OutputStream *ost, const AVPacket *pkt) { - AVCodecContext *enc; + AVCodecContext *enc = ost->enc_ctx; int frame_number; double ti1, bitrate, avg_bitrate; @@ -71,7 +71,6 @@ static void do_video_stats(OutputStream *ost, const AVPacket *pkt) } } - enc = ost->enc_ctx; frame_number = ost->packets_written - 1; if (vstats_version <= 1) { fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number,