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

Michael Niedermayer michaelni at gmx.at
Mon Dec 26 21:48:49 CET 2011


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

the rest of the patch LGTM

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111226/acee61c3/attachment.asc>


More information about the ffmpeg-devel mailing list