Moral rights are a legal obligation to protect the relationship between artists and their work.
In Australia there are 3 moral rights:
However the third point is most often difficult for a Producer to uphold, because most films need the right to alter the music for multiple versions of the film. For example, to meet TV time slots, to incorporate advertisements, foreign language and in-flight versions etc) where consultation with the composer is not possible. Hence, many (actually most) film commissions/agreements ask a composer to consent this right to the Producer.
Therefore, to protect the first two points of a creator’s moral rights as noted above, the composer should make sure their contractual agreement with the Producer includes a section where the Producer is legally compelled to credit the Composer (right of attribution and the right against false attribution) on all copies of the film, and in equal prominence to other key creatives.
For further information on moral rights see here and here for more information