[FFmpeg-devel] [PATCH] lavu/samplefmt: add function av_samples_alloc_pointers()
Stefano Sabatini
stefasab at gmail.com
Tue Jul 9 15:30:15 CEST 2013
On date Tuesday 2013-07-09 12:58:05 +0000, Paul B Mahol encoded:
> On 3/31/13, Stefano Sabatini <stefasab at gmail.com> wrote:
[...]
> >> > +int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int
> >> > *linesize, int nb_channels,
> >> > + int nb_samples, enum
> >> > AVSampleFormat sample_fmt, int align)
> >> > +{
> >> > + int ret, nb_planes = av_sample_fmt_is_planar(sample_fmt) ?
> >> > nb_channels : 1;
> >> > +
> >> > + *audio_data = av_malloc(sizeof(*audio_data) * nb_planes);
> >>
> >> should probably be av_calloc
> >
> > Yes.
> >
> >> otherwise LGTM
> >
> > Pushed with that change, thanks.
[...]
> What is point of this if not used by anything?
Check for example examples/resampling.c.
--
FFmpeg = Forgiving & Fierce MultiPurpose Encoding/decoding Gnome
More information about the ffmpeg-devel
mailing list