aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-14 01:50:15 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-21 15:52:09 +0200
commit9385847af47211e8c618198499ffea99614bb55d (patch)
tree4b65e0f118cd68a8e80d61e002586a105d95ba85
parentc37dc63c7dbd15d057144ad796fda685db684dac (diff)
downloadffmpeg-9385847af47211e8c618198499ffea99614bb55d.tar.gz
avfilter/vf_deshake_opencl: Ensure that the first iteration initializes the best variables
Fixes: CID1452759 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/vf_deshake_opencl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c
index 96e21a069f..5c3848c3ed 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];
}