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>
(cherry picked from commit 9385847af4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 7 months ago
parent ca19dbf33d
commit 39d083cb73
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      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];
}

Loading…
Cancel
Save