[Ffmpeg-devel] Re: [PATCH] Machine endian bytestream functions

Rich Felker dalias
Mon Apr 16 23:18:51 CEST 2007

On Mon, Apr 16, 2007 at 05:39:15PM -0300, Ramiro Ribeiro Polla wrote:
> I didn't know what that __packed__ was doing there. But now I checked 
> with an arm compiler...

I'm not familar with the discussion, but: __packed__ is not portable
C. It's fine for conditionally-compiled code to use it, just like the
inline asm, but the whole program should build on any standard C
compiler as long as all arch-specific optimizations are disabled. This
means that you cannot rely on attribute(__packed__) to do the
unaligned reads/writes for you; you must use byte-by-byte code in the
general case.


More information about the ffmpeg-devel mailing list