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 9B3E54B7E0 for ; Fri, 14 Jun 2024 08:40:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EAA8B68D607; Fri, 14 Jun 2024 11:40:38 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B113568D53F for ; Fri, 14 Jun 2024 11:40:31 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 018274000A for ; Fri, 14 Jun 2024 08:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718354431; 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: in-reply-to:in-reply-to:references:references; bh=4OVGTkL60+ofIKTKtAb3MlZB2+lywSPhMrhbyCKvhTs=; b=JesmbYFUj4rCvsQUjBaWuojMhESx4WULPJimILw0eaDppxhOXzwMdJRaO1567Yh4+E19N1 99Og0RZG8ylPadiON1khC1qvYDONPIa9f9b+tMZGy5OQ3uu36mvhGr78AcfNrx+39XTfOG t1lakv5YjgI6OuSXMmm8m30FkdThqsWEPl3RVF04bfv1WyJTvup6mRlwQX+0aEuD1fps2x YlJI/3fVqPA+LwHzDAdFGEuSkdOe7JBI/ktsgTorhYsxA59f2blyqqTMK5ikfqUhPTR49I WM3Ek78IVA4/7Uxxf9c/xUQ3iKRYgR/3gyNqYkfJ33HGJ70G6jRGde2ZupGjAQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 14 Jun 2024 10:40:28 +0200 Message-ID: <20240614084028.442499-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614084028.442499-1-michael@niedermayer.cc> References: <20240614084028.442499-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/2] avfilter/vf_deshake_opencl: Ensure that the first iteration initializes the best variables 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: Fixes: CID1452759 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_deshake_opencl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c index 96e21a069f2..5c3848c3ede 100644 --- a/libavfilter/vf_deshake_opencl.c +++ b/libavfilter/vf_deshake_opencl.c @@ -703,7 +703,7 @@ static int minimize_error( total_err += deshake_ctx->ransac_err[j]; } - if (total_err < best_err) { + if (i == 0 || total_err < best_err) { for (int mi = 0; mi < 6; ++mi) { best_model[mi] = model[mi]; } -- 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".