[FFmpeg-devel] [ffmpeg-devel] [PATCH 1/4] lavfi: add asrc_abuffer - audio source buffer filter

Mina Nagy Zaki mnzaki at gmail.com
Mon Aug 1 10:59:33 CEST 2011

On Wed, Jul 27, 2011 at 11:56:32AM +0200, Stefano Sabatini wrote:
> On date Wednesday 2011-07-27 01:05:17 +0300, Mina Nagy Zaki encoded:

I rewrote the docs.

> What about:
> int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffer_src,
>                                         AVFilterBufferRef *samplesref, int flags);
> ?
> consistent with vsrc_buffer.h, more API-robust.

Added this to API, and kept others too such that we have entry points on
different 'levels'

> > +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
> > +{
> > +    ABufferSourceContext *abuffer = ctx->priv;
> > +    char sample_fmt_str[8], chlayout_str[16], sample_rate_str[16];
> 16 is not enough for the layout.

Made it 32, which I think is enough.


Fixed everything else. Kept API as discussed.

Also, added input normalization, and tested a bit. But normalizing samplerate
has been a problem due to the codec picking up the sample rate of the very last
block on the first block. I can implement a workaround for this, but I think it
would be better to fix the codec.

More information about the ffmpeg-devel mailing list