avfilter/vf_scale: properly reinitialize framesync

Fixes leaks as reported by ASAN and Valgrind.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-05-05 11:39:49 -03:00
parent ccf395e8bd
commit 82397084a9

View File

@ -766,6 +766,7 @@ static int config_props(AVFilterLink *outlink)
av_freep(&flags_val);
if (ctx->filter != &ff_vf_scale2ref) {
ff_framesync_uninit(&scale->fs);
ret = ff_framesync_init(&scale->fs, ctx, ctx->nb_inputs);
if (ret < 0)
return ret;