From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B50D54F487 for ; Tue, 17 Jun 2025 12:07:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2685568D0AC; Tue, 17 Jun 2025 15:06:31 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id BE69E68CEBF for ; Tue, 17 Jun 2025 15:06:15 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id 3B2A943580; Tue, 17 Jun 2025 14:06:11 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Jun 2025 14:06:04 +0200 Message-ID: <20250617120609.1987435-11-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617120609.1987435-1-ffmpeg@haasn.xyz> References: <20250617120609.1987435-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 11/13] avfilter/f_ebur128: move variable declarations to usage site 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 Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas This is actually allowed by non-ancient versions of C. --- libavfilter/f_ebur128.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index 4051b1ea95..1fb7129271 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -652,7 +652,7 @@ void ff_ebur128_filter_channels_c(const EBUR128DSPContext *dsp, static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) { - int i, ch, idx_insample, ret; + int ret; AVFilterContext *ctx = inlink->dst; EBUR128Context *ebur128 = ctx->priv; const EBUR128DSPContext *dsp = &ebur128->dsp; @@ -705,7 +705,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) } - for (idx_insample = ebur128->idx_insample; idx_insample < nb_samples; idx_insample++) { + for (int idx_insample = ebur128->idx_insample; idx_insample < nb_samples; idx_insample++) { const int bin_id_400 = ebur128->i400.cache_pos++; const int bin_id_3000 = ebur128->i3000.cache_pos++; @@ -741,7 +741,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) #define COMPUTE_LOUDNESS(m, time) do { \ if (ebur128->i##time.filled) { \ /* weighting sum of the last