Use unsigned int in samples attributes.
Fix in AMF loading: check for invalid samples offsets.
Fixes in MED4 loading: supported format variations, improved errors checking.