[FFmpeg-devel] [PATCH] Add comment about swresample buffering.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Feb 3 21:15:12 CET 2012


On Fri, Feb 03, 2012 at 08:55:02PM +0100, Michael Niedermayer wrote:
> On Fri, Feb 03, 2012 at 08:43:00PM +0100, Reimar Döffinger wrote:
> > ---
> >  libswresample/swresample.h |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libswresample/swresample.h b/libswresample/swresample.h
> > index 8dc4e1f..7651a83 100644
> > --- a/libswresample/swresample.h
> > +++ b/libswresample/swresample.h
> > @@ -102,6 +102,8 @@ void swr_free(struct SwrContext **s);
> >   *
> >   * @param s         allocated Swr context, with parameters set
> >   * @param out       output buffers, only the first one need be set in case of packed audio
> > + *                  Note: in case this is not sufficiently large, remaining
> > + *                  samples will be buffered.
> >   * @param out_count amount of space available for output in samples per channel
> >   * @param in        input buffers, only the first one need to be set in case of packed audio
> >   * @param in_count  number of input samples available in one channel
> 
> this is only true when resampling is used

What happens when resampling is not used? Will they be lost?
Also, a suggestion was an API extension to get the number of buffered
samples, does that sound useful?


More information about the ffmpeg-devel mailing list