[FFmpeg-devel] [PATCH] avfilter: add apad filter

Michael Niedermayer michaelni at gmx.at
Tue Dec 18 16:28:06 CET 2012


On Tue, Dec 18, 2012 at 12:52:45PM +0100, Clément Bœsch wrote:
> On Tue, Dec 18, 2012 at 05:23:46AM +0100, Michael Niedermayer wrote:
> > This filter pads an audio stream with silence
> > It can together with -shortest be used to extend audio streams to
> > the same length as video.
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavfilter/Makefile     |    1 +
> >  libavfilter/af_apad.c    |  116 ++++++++++++++++++++++++++++++++++++++++++++++
> >  libavfilter/allfilters.c |    1 +
> >  3 files changed, 118 insertions(+)
> >  create mode 100644 libavfilter/af_apad.c
> > 
> 
> Would be nice to have an entry + example in doc/filters.texi.

ill add an example later, as i want to add a few more user setable
parameters and tehy could go in the example

[...]
> > +    .init          = init,
> > +    .priv_size     = sizeof(APadContext),
> > +    .inputs        = apad_inputs,
> > +    .outputs       = apad_outputs,
> > +};
> > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
> > index 8c8f1fc..fc96809 100644
> > --- a/libavfilter/allfilters.c
> > +++ b/libavfilter/allfilters.c
> > @@ -45,6 +45,7 @@ void avfilter_register_all(void)
> >      REGISTER_FILTER (AMERGE,      amerge,      af);
> >      REGISTER_FILTER (AMIX,        amix,        af);
> >      REGISTER_FILTER (ANULL,       anull,       af);
> > +    REGISTER_FILTER (APAD,        apad,        af);
> >      REGISTER_FILTER (ARESAMPLE,   aresample,   af);
> >      REGISTER_FILTER (ASELECT,     aselect,     af);
> >      REGISTER_FILTER (ASENDCMD,    asendcmd,    af);
> 
> LGTM otherwise.

issues fixeds,
applied


> 
> Note that this is likely achievable with a concat + aevalsrc=0, so maybe
> it could be worth mentioning the filter in the documentation example of
> aevalsrc=0.

agree, but this isnt related to this patch

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121218/1f80142d/attachment.asc>


More information about the ffmpeg-devel mailing list