[FFmpeg-devel] [PATCH] Move link_dpad and link_spad macros from avfilter.c to internal.h, so
Stefano Sabatini
stefano.sabatini-lala
Mon Sep 27 03:19:00 CEST 2010
On date Monday 2010-09-27 02:12:03 +0200, Michael Niedermayer encoded:
> On Mon, Sep 27, 2010 at 01:49:35AM +0200, Stefano Sabatini wrote:
[...]
> > I guess the main reason of the current design is to simplify the
> > operation of filter auto-insertion, check avfilter_insert_filter().
> >
> > Allowing the filter to know the input and output index pads (rather
> > than the corresponding pointers) is convenient, e.g. it allows to
> > directly do:
> >
> > src->outputs[link->srcpad] = new_lnk;
> > new_lnk->srcpad = link->srcpad;
> >
> > rather than having to iterate through all the src->outputs in
> > order to find the one which is equal to the pointer pointed by
> > link->srcpad.
> >
> > for (padidx = 0; i < src->output_count; padidx++)
> > if (src->output_pads[padidx] == link->srcpad) {
> > link->srcpad = NULL;
> > src->outputs[padidx] = new_lnk;
> > new_lnk->srcpad = src->output_pads[padidx];
> > break;
> > }
>
> index == pointer - src->output_pads
Updated.
--
FFmpeg = Free Furious Magical Peaceless Experimenting God
More information about the ffmpeg-devel
mailing list