avcodec_close() is deprecated and it's not supported anymore to re-open
a codec, so we only ever allocate the codec in set_format() now and
always free it after usage.
As part of this, also fix various memory leaks in related code paths.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7148>
The avvideocompare element compares two incoming video buffers using
the specified comparison method (e.g. ssim or psnr). The first
video buffer is passthrough, unchanged.
The comparison is calculated by using libav's ssim or psnr filters.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3366>