[FFmpeg-devel] [PATCH] Mimic decoder
    Uoti Urpala 
    uoti.urpala
       
    Mon Mar 17 19:56:34 CET 2008
    
    
  
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.
    
    
More information about the ffmpeg-devel
mailing list