From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2BEEE4B654 for ; Mon, 10 Jun 2024 19:10:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 85E8868D7A0; Mon, 10 Jun 2024 22:10:04 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A035C68D6A1 for ; Mon, 10 Jun 2024 22:09:58 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D2245FF804 for ; Mon, 10 Jun 2024 19:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718046598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=vlgmOkUI3e7d0vcDOK0knm6aweGuSEFz+RvgN3snJUo=; b=nd4d6S1nbhOSUl6cn42cS8TSXbQrBvVrEFOMbvAOyFsJl7JsPacEPKuHnq0tmP1dAoBLu6 npWikgAk14ekegjwsS4+4XUfNv/j+q4jgh4v655fKZccrHHnKTti8ZXOcL9mLJzjKcSwr7 suKaONCiE0K4TUGebOG+fICFdggrsZnwpRaeEB0lEmOTejWlYgkuVN8is1FQXdhbvsg4Sp JFP6sZD/kZHWI1lg5Nl7WuqRofvQg59+gczxkrPN+qo18CMJBkU20WscVQH0wcKbX4mPNt DwD0TvjWkuXULSs9JycSQJR5TTr+AzHorWFPW/ByPwj+6SlTt3gLF1MLf4RG7g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 10 Jun 2024 21:09:54 +0200 Message-ID: <20240610190956.2615107-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/3] avfilter/af_afftdn: Assert format 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 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: Maybe helps: CID1515514 Uninitialized scalar variable Maybe helps: CID1515517 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/af_afftdn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c index 96c2246074c..a2e6ca61076 100644 --- a/libavfilter/af_afftdn.c +++ b/libavfilter/af_afftdn.c @@ -20,6 +20,7 @@ #include +#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/channel_layout.h" #include "libavutil/mem.h" @@ -376,6 +377,8 @@ static void process_frame(AVFilterContext *ctx, case AV_SAMPLE_FMT_DBLP: noisy_data[i] = mag = hypot(fft_data_dbl[i].re, fft_data_dbl[i].im); break; + default: + av_assert2(0); } power = mag * mag; @@ -970,6 +973,8 @@ static void sample_noise_block(AudioFFTDeNoiseContext *s, mag2 = fft_out_dbl[n].re * fft_out_dbl[n].re + fft_out_dbl[n].im * fft_out_dbl[n].im; break; + default: + av_assert2(0); } mag2 = fmax(mag2, s->sample_floor); -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".