Trying to tag metadata in M4p file. It is an audio file with only one trak but at the end of the file it conatins two mdat atoms (the first is only 8 bytes) my code isnt expecting this so fails when checking it has written data correctly.

End of atomicparsley - T output

Atom free @ 434740 of size: 84, ends @ 434824
Atom free @ 434824 of size: 8, ends @ 434832
Atom mdat @ 434832 of size: 8, ends @ 434840
Atom mdat @ 434840 of size: 3347041, ends @ 3781881
Atom free @ 3781881 of size: 21, ends @ 3781902

But my question is why does it have two mdat atoms ( and why so many free atoms)

thanks Paul