Retargeting animations

Hi, all!

I have 2 skeletons, with basically the same topology (have some unimportant extra bones not used in animation).
I want to reuse animations from first skeleton on second.
When I try to directly use .ani file with second
skeleton, I see a lot of distortion. However if I append action from skeleton1 to skeleton2 in Blender,
then export, animation works fine. Any ideas? Should I somehow process this animation?