[FFmpeg-devel] [PATCH 4/6] avfilter/avfilter: Allow to free non-static pads generically

Nicolas George george at nsup.org
Tue Aug 17 10:52:29 EEST 2021


Andreas Rheinhardt (12021-08-17):
> This can be enabled/disabled on a per-filter basis by setting
> the new internal flags FF_FILTER_FLAG_FREE_(IN|OUT)PADS and
> on a per-pad basis by setting the AVFILTERPAD_FLAG_FREE_NAME flag.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> I decided to combine both approaches: It has the advantage that
> the marginal extra code for a filter all of whose inputs'/outputs'
> names need to be freed is zero while making it easy to handle filters
> that have some inputs/outputs whose names need to be freed.

It had the drawback that the information about the nature of the pads
ends up at two places of the code that are not close to each other. It
is not good for maintenance and readability.

I think a boolean flag to ff_append_...pad() would do the job much more
elegantly. What do you think about it?

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/20210817/66979ab7/attachment.sig>


More information about the ffmpeg-devel mailing list