[FFmpeg-devel] [PATCH] anullsrc: implement a request_frame callback for returning frames

Stefano Sabatini stefasab at gmail.com
Sun Sep 18 12:46:09 CEST 2011


On date Saturday 2011-09-17 16:06:50 +0200, Michael Niedermayer encoded:
> On Sat, Sep 17, 2011 at 12:56:13PM +0200, Stefano Sabatini wrote:
> > This is mainly useful for filters (like the sox synth), which
> > overwrite the content of the passed data.
> > ---
> >  doc/filters.texi            |   10 ++++++++--
> >  libavfilter/asrc_anullsrc.c |   25 +++++++++++++++++++++----
> >  2 files changed, 29 insertions(+), 6 deletions(-)
> 
> LGTM

Pushed.

> i wonder if we want some way for the next filter to request a specific
> number of samples if the source filter is able to do that easily

request_samples(..., int nb_samples);
?

I need to think to see if this could be a good idea or not (in general
such a callback may be difficult to implement, and would require
caching every time a filter is not able to produce the exact required
number of samples).
-- 
FFmpeg = Fancy Faithless Minimalistic Puritan Eager God


More information about the ffmpeg-devel mailing list