[FFmpeg-devel] Eliminating long
Mon Mar 31 01:40:34 CEST 2008
On Sun, Mar 30, 2008 at 11:40:36PM +0100, Jay L. T. Cornwall wrote:
> Luca Barbato wrote:
> >> There is no reliable way to marshall this type into a managed structure
> >> on all platforms. Could I request that the type be made explicit in
> >> ByteIOContext, as 'unsigned int' or 'uint32_t'.
> > I'm not sure that's a good workaround... Cannot fix it on your wrapper side?
> Not reliably. The size of the ByteIOContext structure depends on the
> compiler that FFmpeg was built with. It's worse than a 32-bit/64-bit
> issue; unfortunately the C specification is lax enough to permit that
> for the long type. There's no way to detect how the structure was built
> from C#.
Huh, you mean there is no way to differentiate between a 32 and a 64 bit
library? That seems hard to believe...
Either way, IMO the code at least lacks a comment as to why long is used
for all that checksum stuff, I currently can't seen any sense in that...
More information about the ffmpeg-devel