[FFmpeg-devel] [PATCH] Mimic decoder
Ramiro Polla
ramiro
Mon Mar 17 20:12:49 CET 2008
Uoti Urpala wrote:
> On Mon, 2008-03-17 at 15:07 -0300, Ramiro Polla wrote:
>> According to the nice folks at ##c at freenode.net, the memory for the
>> array must be contiguous and unpadded, something I wasn't aware of. Just
>> out of curiosity, can some C99 expert point me out where that's written
>> on the spec?
>
> At least 6.2.5.20 says "An array type describes a contiguously allocated
> nonempty set of objects". There might be references elsewhere too.
>
> This is the reason why sizeof (struct {int a; char b;}) == 8 instead of
> 5. A single such struct would only need 5 bytes of space, but the size
> needs to be a multiple of alignment to make arrays work.
That was quick... Thanks =)
More information about the ffmpeg-devel
mailing list