[FFmpeg-devel] [PATCH] lavfi: fix avfilter_default_get_audio_buffer() after changes in av_samples_alloc()

Stefano Sabatini stefasab at gmail.com
Tue Dec 27 15:30:37 CET 2011


On date Monday 2011-12-26 21:48:49 +0100, Michael Niedermayer encoded:
> On Mon, Dec 26, 2011 at 12:08:43AM +0100, Stefano Sabatini wrote:
> > av_samples_alloc() behavior changed in bbb46f3ec, resulting in random
> > data filling the data[] and linesize[] arrays of the returned
> > AVFilterBufferRef, which was resulting in wrong behavior in case of code
> > checking on data[i] nullity.
> > 
> > In particular fixes crash in avfilter_filter_samples():
> >         for (i = 0; samplesref->data[i]; i++)
> >             memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]);
> 
> This still will fail with 8 channels i think

Yes, fixed in a separate commit.

> the rest of the patch LGTM

Pushed.

BTW I suppose we'll have to change the way lavfi deals with audio
buffers, to make it more consistent with lavu/lavc and remove the
max-8-channels limitation.
-- 
FFmpeg = Funny and Fascinating Minimal Proud Extended Guru


More information about the ffmpeg-devel mailing list