[FFmpeg-devel] [PATCH 3/3] random_seed: Replace a VLA with a heap alloc

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Sep 7 19:44:45 CEST 2012


On Fri, Sep 07, 2012 at 01:42:44PM -0400, Derek Buitenhuis wrote:
> On 07/09/2012 1:35 PM, Michael Niedermayer wrote:
> > i would suggest
> > uint8_t tmp[120];
> > ...
> > av_assert0(sizeof(tmp) >= av_sha_size)
> > 
> > this would be simpler and completely avoid variable allocation
> 
> Wouldn't this be duplicating av_sha_size? I'm not against it, but
> in general, I am wary of duplicated numbers like this.
> 
> BTW, why is av_sha_size not a constant/define anyway?

The point is to allow changing the struct without breaking ABI.


More information about the ffmpeg-devel mailing list