[FFmpeg-devel] [PATCH 1/2] lavfi: add FF_*LINK_IDX convenience macros.

Stefano Sabatini stefasab at gmail.com
Sat Jul 21 18:03:06 CEST 2012


On date Friday 2012-07-20 10:40:54 +0200, Nicolas George encoded:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/internal.h |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> 
> Fixed: even for nice-looking alignment, spaces between a macro name and its
> argument list are not permitted.
> 
> diff --git a/libavfilter/internal.h b/libavfilter/internal.h
> index d1bcb03..40c3f4a 100644
> --- a/libavfilter/internal.h
> +++ b/libavfilter/internal.h
> @@ -347,4 +347,12 @@ int ff_request_frame(AVFilterLink *link);
>          .category   = AV_CLASS_CATEGORY_FILTER, \
>      }
>  
> +/**
> + * Find the index of a link.
> + *
> + * I.e. find i such that link == ctx->(in|out)puts[i]
> + */
> +#define FF_INLINK_IDX(link)  ((int)((link)->dstpad - (link)->dst->input_pads))
> +#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
> +

Should be OK this time.
-- 
FFmpeg = Friendly & Funny Muttering Puritan EnGraver


More information about the ffmpeg-devel mailing list