[MPlayer-cvslog] r25404 - trunk/stream/vcd_read_darwin.h

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Dec 15 13:51:31 CET 2007


Hello,
On Sat, Dec 15, 2007 at 01:17:52PM +0100, ulion wrote:
> Author: ulion
> Date: Sat Dec 15 13:17:51 2007
> New Revision: 25404
> 
> Log:
> The buffer used for pread need be aligned, but currently it's not.
> This will cause the pread always got random data so can not play vcd.
> Fixed by move the buffer ahead in the structure to make sure it's aligned.

it must be aligned to what? And this is not a really good solution
unless I missed something in the C standard that would require it to be
aligned correctly like this.
Actually memalign and the gcc-specific __attribute__ are the only ways
to ensure alignment I know of.
Well, putting it in a union with something of the right size (like
uint32_t or uint64_t) maybe, but that seems even uglier...

Greetings,
Reimar Döffinger



More information about the MPlayer-cvslog mailing list