From: Erik J. <eri...@gm...> - 2016-04-21 11:16:02
|
Hello, I have a build environment where 'long' are stored in eight bytes. Found the following issue while looking at supporting empty edit entries: Media time A 32-bit integer containing the starting time within the media of this edit segment (in media timescale units). If this field is set to –1, it is an empty edit. (lldb) p edts.elst.table[0].time (long) $1 = 4294967295 Hmm... long quicktime_read_int32(quicktime_t *file) { unsigned long result; unsigned long a, b, c, d; uint8_t data[4]; quicktime_read_data(file, data, 4); a = data[0]; b = data[1]; c = data[2]; d = data[3]; result = (a << 24) | (b << 16) | (c << 8) | d; return (long)result; } (lldb) p sizeof(long) (unsigned long) $3 = 8 Attaching a patch to change quicktime_read_int32, quicktime_read_int32_le & quicktime_read_uint32 to use int32_t and uint32_t instead of long. Thanks, Erik |