[FFmpeg-devel] [PATCH] New registration system for avfilter filters

Michael Niedermayer michaelni
Mon Nov 23 20:40:01 CET 2009


On Mon, Nov 23, 2009 at 01:37:20AM +0100, Stefano Sabatini wrote:
[...]
> +AVFilter *registered_avfilters[MAX_REGISTERED_AVFILTERS_NB + 1];
> +
> +int next_registered_avfilter_idx = 0;

static 


>  
>  AVFilter *avfilter_get_by_name(const char *name)
>  {
> -    AVFilter *filter;
> +    int i;
>  
> -    for (filter = first_avfilter; filter; filter = filter->next)
> -        if (!strcmp(filter->name, name))
> -            return filter;

> +    for (i = 0; registered_avfilters[i] && i < MAX_REGISTERED_AVFILTERS_NB; i++)

redundant check


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091123/c9233445/attachment.pgp>



More information about the ffmpeg-devel mailing list