[FFmpeg-devel,0/3] vf_guided patches

Message ID HE1PR0301MB21542247850C43A99121CC098F509@HE1PR0301MB2154.eurprd03.prod.outlook.com
Headers show


Andreas Rheinhardt May 14, 2021, 10:18 a.m. UTC
These patches address some issues in this filter; I initially wanted to
nuke it after having found out that it runs into the av_assert1() in
ff_filter_activate() (it seems that generic timeline support together
with .activate is not supported, but I don't know what is wrong with
it), but decided against it after having found out that more filters
suffer from this (namely remap, afftdn and sidechaingate), so that
support for this needs to be implemented. Needless to say this issue
would have been found ages ago if these filters were covered by FATE.

Even after this patchset, some more issues remain open:
1. This filter should probably use FRAMESYNC_DEFINE_CLASS() and add
the corresponding .preinit; right now, the framesync options are
2. If I am not mistaken, there is no guarantee for
ff_framesync_dualinput_get() to return a ref_frame on success; so
maybe one should check for this before ff_get_video_buffer() and just
"return ff_filter_frame(outlink, main_frame);" in this scenario.
3. This filter allocates and frees quite a lot of buffers per frame
(and duplicates this code); this should be avoided.

Andreas Rheinhardt (3):
  avfilter/vf_guided: Don't free frame we don't own
  avfilter/vf_guided: Fix leak of frames
  avfilter/vf_guided: Don't needlessly copy properties, fix potential

 libavfilter/vf_guided.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)