[FFmpeg-devel] [PATCH] cllc: Pad swapepd buffer

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Aug 26 00:20:06 CEST 2012


On 25 Aug 2012, at 21:21, Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
> On 25/08/2012 5:21 AM, Reimar Döffinger wrote:
>> Sorry for asking without looking at the code, but does this have to be realloc?
>> Because we have av_fast_padded_malloc (or such) that includes this, without a (in thus case only on invalid input I think) risk for integer overflow, and initializes the padding to 0.
> 
> av_fast_padded_malloc is not sufficient. It only zeros the padding when
> the buffer is resized (enlarged), and it needs to be zero'd regardless.

Only because the buffer size allocated is too large.

> There's no benefit to using it.

It also simplifies the allocation failure handling and can be faster.


More information about the ffmpeg-devel mailing list