[FFmpeg-devel] [PATCH] Implement avfilter_make_format_list2(enum PixelFormat pix_fmt, ...)

Stefano Sabatini stefano.sabatini-lala
Sat Oct 17 01:55:39 CEST 2009


Hi,

the interface of AVFilterFormats *avfilter_make_format_list(int len,
...) is quite brittle, since it requires the exact number of
parameters to be passed, especially with long lists it is quite easy
to get it wrong or get it de-synched for example if a new format is
added to the list.

This new function provides a more robust / convenient interface, the
list is terminated by PIX_FMT_NONE and so the user doesn't need to
manually adjust the value of len.

No it doesn't look very convenient to factorize the code
avfilter_make_format_list() with avfilter_make_format_list(), anyway
my idea was to deprecate the old interface, or maybe simply to change
the avfilter_make_format_list() interface as the API is declared
non-stable yet.

Regards.
-- 
FFmpeg = Friendly & Friendly Monstrous Philosofic Enhancing Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lavfi-make-format-list2.patch
Type: text/x-diff
Size: 1916 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091017/36a7638b/attachment.patch>



More information about the ffmpeg-devel mailing list