[FFmpeg-devel] [PATCH] lavu/samplefmt: add function av_samples_alloc_pointers()

Stefano Sabatini stefasab at gmail.com
Sun Mar 24 00:06:20 CET 2013


On date Saturday 2013-03-23 12:18:27 -0400, compn encoded:
> On Sat, 23 Mar 2013 17:01:41 +0100, Stefano Sabatini wrote:
> >On date Saturday 2013-03-23 13:09:30 +0100, Michael Niedermayer encoded:
> >> On Thu, Mar 21, 2013 at 08:54:33PM +0100, Stefano Sabatini wrote:
> >> > ---
> >> >  libavutil/samplefmt.c |   12 ++++++++++++
> >> >  libavutil/samplefmt.h |   13 +++++++++++++
> >> >  2 files changed, 25 insertions(+)
> >> > 
> >> > diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
> >> > index 6f762df..2066c97 100644
> >> > --- a/libavutil/samplefmt.c
> >> > +++ b/libavutil/samplefmt.c
> >> > @@ -207,6 +207,18 @@ int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
> >> >  #endif
> >> >  }
> >> >  
> >> > +int av_samples_alloc_pointers(uint8_t ***audio_data, int *linesize, int nb_channels,
> >> > +                              int nb_samples, enum AVSampleFormat sample_fmt, int align)
> >> > +{
> >> 
> >> the code LGTM but i think this is a confusing name for public API
> >> 
> >> av_samples_alloc_array_and samples() should be better but iam not
> >> sure its ideal either
> >
> >Works for me, more ideas?
> 

> av_samples_alloc_plus_array ?

Not very clear, and inconsistent with the rest of the API.

I'll push the av_samples_alloc_array_and_samples() variant in one/two
days if I read no objections/comments.
-- 
FFmpeg = Fostering Free Magical Philosophical Ecstatic Goblin


More information about the ffmpeg-devel mailing list