[FFmpeg-devel] [PATCH 1/2] lavfi: Add vf_ssim360 filter

Nicolas George george at nsup.org
Mon Aug 9 13:34:54 EEST 2021


Anton Khirnov (12021-08-09):
> +        heatmap_file = av_fopen_utf8(s->heatmap_path, "r");
> +        if (!heatmap_file) {
> +            av_log(ctx, AV_LOG_ERROR, "cannot open heatmap file %s\n", s->heatmap_path);
> +            return AVERROR(EINVAL);
> +        }
> +        ret = load_heatmaps(&s->heatmaps, heatmap_file,
> +                            s->default_heatmap_w, s->default_heatmap_h);
> +        if (ret < 0)
> +            return ret;

I cannot comment much, but I notice you might be leaking heatmap_file.

Why do you do this with a test in each activate() rather than in init()
or one of the config_props()?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210809/dd14e97c/attachment.sig>


More information about the ffmpeg-devel mailing list