1. Why do I have this sigsegfault, I told above, if I use the default pointer from raw.h and compile this whole stuff in Linux?
unsigned int buffer; // points to image data
void* buffer; // points to image data;
on 32 bit systems, unsigned int is *usually* 32 bits, on 64 bit systems it is usually 64 bits.
memory pointers, no matter of which type behave the same way.
this is based on
- native register width
- memory address bus width
and compilers may do anything as long C standard is followed.
this even can result in unsigned int being 16 bit and char * being 64 bit.
thus developers are encouraged to use stdint.h where possible.
it defines uint32_t (8/16/32/64) types that are reliably of desired width.
as soon you write e.g. structs that should be read by other systems, you can be sure that
the other system doesnt get into trouble and reads crap.
well, still we all only think of little endian devices, so people with big endian ARM systems will
still have trouble in getting mlv_dump etc running.