[FFmpeg-devel] [PATCH 2/2] doc/examples: add audio decoding/filtering example.

Clément Bœsch ubitux at gmail.com
Tue Feb 21 17:59:14 CET 2012


On Tue, Feb 21, 2012 at 05:59:24PM +0200, Andrey Utkin wrote:
> 2012/2/20 Clément Bœsch <ubitux at gmail.com>:
> > +    AVABufferSinkParams *abuffersink_params;
> ...
> > +    /* buffer audio sink: to terminate the filter chain. */
> > +    abuffersink_params = av_abuffersink_params_alloc();
> > +    abuffersink_params->sample_fmts     = sample_fmts;
> > +    abuffersink_params->channel_layouts = chlayouts;
> > +    abuffersink_params->packing_fmts    = packing_fmts;
> > +    ret = avfilter_graph_create_filter(&buffersink_ctx, buffersink, "out",
> > +                                       NULL, abuffersink_params, filter_graph);
> 
> As i see, abuffersink_params in the asink_init is not being referenced
> or so. Its contents are just read and copied to internal context.
> I think we should use automatic allocation - for sake of simplicity,
> to avoid API users think they must also allocate AVABufferSinkParams
> on a heap (using special function) and pass the pointer.

What do you propose to achieve the "automatic allocation"?

And why "think"? They actually have to do that allocation.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120221/55edfa9d/attachment.asc>


More information about the ffmpeg-devel mailing list