[FFmpeg-devel] Eliminating long

Måns Rullgård mans
Mon Mar 31 03:43:34 CEST 2008

"Jay L. T. Cornwall" <jay at jcornwall.me.uk> writes:

> 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#.

Bug in C#.  FFmpeg is not the place to fix bugs in C#.

> If there is a need for the checksum field's size to vary with bitness, 
> size_t is a portable alternative.

How is a variable-size size_t any easier to deal with than a
variable-size long?  This stinks of Microsoft shortsightedness all

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list