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 98A394F350 for ; Mon, 16 Jun 2025 11:21:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id F366768DC9A; Mon, 16 Jun 2025 14:20:21 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 31F9368DC27 for ; Mon, 16 Jun 2025 14:20:11 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id F0CAB436BD; Mon, 16 Jun 2025 13:20:06 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Mon, 16 Jun 2025 13:19:59 +0200 Message-ID: <20250616112003.10665-11-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250616112003.10665-1-ffmpeg@haasn.xyz> References: <20250616112003.10665-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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